Skip to content

Commit

Permalink
Merge branch 'develop-desktop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rudi-krsoftware committed Jun 10, 2017
2 parents 1b58a3c + 4f958d7 commit 40f9ff9
Show file tree
Hide file tree
Showing 26 changed files with 1,234 additions and 154 deletions.
32 changes: 32 additions & 0 deletions database/DbOpenRetail.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,22 @@ CREATE TABLE m_golongan (

ALTER TABLE m_golongan OWNER TO postgres;

--
-- Name: m_harga_grosir; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE m_harga_grosir (
harga_grosir_id t_guid NOT NULL,
produk_id t_guid,
harga_ke integer,
harga_grosir t_harga,
jumlah_minimal t_jumlah,
diskon t_jumlah
);


ALTER TABLE m_harga_grosir OWNER TO postgres;

--
-- Name: m_header_nota; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
Expand Down Expand Up @@ -2283,6 +2299,14 @@ ALTER TABLE ONLY m_golongan
ADD CONSTRAINT m_golongan_pkey PRIMARY KEY (golongan_id);


--
-- Name: m_harga_grosir_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY m_harga_grosir
ADD CONSTRAINT m_harga_grosir_pkey PRIMARY KEY (harga_grosir_id);


--
-- Name: m_header_nota_mini_pos_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--
Expand Down Expand Up @@ -2917,6 +2941,14 @@ CREATE TRIGGER tr_update_total_retur_beli_aiud AFTER INSERT OR DELETE OR UPDATE
CREATE TRIGGER tr_update_total_retur_produk_aiud AFTER INSERT OR DELETE OR UPDATE ON t_item_retur_jual_produk FOR EACH ROW EXECUTE PROCEDURE f_update_total_retur_produk_aiud();


--
-- Name: m_harga_grosir_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY m_harga_grosir
ADD CONSTRAINT m_harga_grosir_fk FOREIGN KEY (produk_id) REFERENCES m_produk(produk_id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- Name: m_item_menu_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
Expand Down
Binary file modified format file import/File Import Excel/Master Data/data_produk.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/OpenRetail.App/Helper/ColorManagerHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static void SetTheme(Form frm, Control parent)

var frmName = frm.Name;

if (!(frmName == "FrmLogin" || frmName.Substring(0, 10) == "FrmPreview"))
if (!(frmName == "FrmLogin" || frmName == "FrmAbout" || frmName.Substring(0, 10) == "FrmPreview"))
{
frm.ShowIcon = false;
frm.ShowInTaskbar = false;
Expand Down
30 changes: 15 additions & 15 deletions src/OpenRetail.App/Helper/GridListControlHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
namespace OpenRetail.App.Helper
{
public sealed class GridListControlHelper
{
public static void InitializeGridListControl<T>(GridListControl gridControl, IList<T> record, IList<GridListControlProperties> oglProperty, bool addRowNumber = true, int rowHeight = 25)
{
public static void InitializeGridListControl<T>(GridListControl gridControl, IList<T> record, IList<GridListControlProperties> oglProperty, bool addRowNumber = true, int rowHeight = 25, int additionalRowCount = 0)
{
gridControl.ShowColumnHeader = true;
gridControl.MultiColumn = true;
Expand All @@ -39,7 +39,7 @@ public static void InitializeGridListControl<T>(GridListControl gridControl, ILi
gridControl.FillLastColumn = true;
gridControl.BorderStyle = BorderStyle.FixedSingle;
gridControl.Grid.GridVisualStyles = GridVisualStyles.Office2010Silver;
gridControl.Grid.Model.RowCount = record.Count;
gridControl.Grid.Model.RowCount = record.Count + additionalRowCount;
gridControl.BackColor = Color.White;
gridControl.Grid.Model.RowHeights[0] = rowHeight;

Expand Down Expand Up @@ -182,49 +182,49 @@ public static void InitializeGridListControl<T>(GridControl gridControl, IList<T
colSizeHelper.ColSizeBehavior = behavior;
}

public static void AddObject<T>(GridListControl gridControl, IList<T> record, T obj, bool isLastRowFocus = true)
public static void AddObject<T>(GridListControl gridControl, IList<T> record, T obj, bool isLastRowFocus = true, int additionalRowCount = 0)
{
record.Add(obj);
gridControl.Grid.Model.RowCount = record.Count;
gridControl.Grid.Model.RowCount = record.Count + additionalRowCount;
gridControl.Refresh();

if (isLastRowFocus)
gridControl.SetSelected(gridControl.Grid.RowCount - 1, true);
}

public static void AddObjects<T>(GridListControl gridControl, IList<T> record)
public static void AddObjects<T>(GridListControl gridControl, IList<T> record, int additionalRowCount = 0)
{
gridControl.Grid.Model.RowCount = record.Count;
gridControl.Grid.Model.RowCount = record.Count + additionalRowCount;
gridControl.Refresh();

if (record.Count > 0)
gridControl.SetSelected(0, true);
gridControl.SetSelected(additionalRowCount, true);
}

public static void UpdateObject<T>(GridListControl gridControl, IList<T> record, T obj)
public static void UpdateObject<T>(GridListControl gridControl, IList<T> record, T obj, int additionalRowCount = 0)
{
record[gridControl.SelectedIndex] = obj;
record[gridControl.SelectedIndex - additionalRowCount] = obj;
gridControl.Refresh();
}

public static void RemoveObject<T>(GridListControl gridControl, IList<T> record, T obj)
public static void RemoveObject<T>(GridListControl gridControl, IList<T> record, T obj, int additionalRowCount = 0)
{
record.Remove(obj);
gridControl.Grid.Model.RowCount = record.Count;
gridControl.Grid.Model.RowCount = record.Count + additionalRowCount;

gridControl.Refresh();

if (record.Count > 0 && gridControl.SelectedIndex != 0)
gridControl.SetSelected(gridControl.SelectedIndex - 1, true);
}

public static void Refresh<T>(GridListControl gridControl, IList<T> record)
public static void Refresh<T>(GridListControl gridControl, IList<T> record, int additionalRowCount = 0)
{
gridControl.Grid.Model.RowCount = record.Count;
gridControl.Grid.Model.RowCount = record.Count + additionalRowCount;
gridControl.Refresh();

if (record.Count > 0)
gridControl.SetSelected(0, true);
gridControl.SetSelected(additionalRowCount, true);

}

Expand Down
Loading

0 comments on commit 40f9ff9

Please sign in to comment.