Esempio n. 1
0
        private void Fill_Combo()
        {
            AC_OB clsAC_OB = new AC_OB();

            DataSet ds = clsAC_OB.Fill_Combo(mSys_System.pComp_ID, mSys_System.pUser_ID);

            if (clsAC_OB.sErrorCode != "")
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErrorCode, false);
                return;
            }
            Set_Combo(lookBranch_ID, ds.Tables[0], "Branch_FName", "Branch_ID", true);
        }
Esempio n. 2
0
        private void Fill_Grid()
        {
            AC_OB   clsAC_OB = new AC_OB();
            DataSet ds       = clsAC_OB.Fill_Grid(mSys_System.pComp_ID, mSys_System.pUser_ID, "", chkSub_Ledger.Checked);

            if (clsAC_OB.sErrorCode != "")
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErrorCode, false);
                return;
            }
            if (ds.Tables.Count > 0)
            {
                gridControl1.DataSource = ds.Tables[0];
            }
        }
Esempio n. 3
0
        private void Save_Update(int isupdate)
        {
            AC_OB clsAC_OB = new AC_OB();
            int   vRet_Val = 0;

            int    vDetail_ID = 0;
            string vSub_ID    = "";

            if (chkSub_Ledger.Checked)
            {
                vDetail_ID = Convert.ToInt32(lookAccounts.EditValue.ToString().Split('|')[0]);
                vSub_ID    = lookAccounts.EditValue.ToString().Split('|')[1];
            }
            else
            {
                vDetail_ID = Convert.ToInt32(lookAccounts.EditValue);
            }
            vRet_Val = clsAC_OB.Save_Update(vDetail_ID, vSub_ID, Convert.ToDouble(txtOB_Dr.Text.Trim()),
                                            Convert.ToDouble(txtOB_Cr.Text.Trim()), chkSub_Ledger.Checked,
                                            mSys_System.pComp_ID, Convert.ToInt32(lookBranch_ID.EditValue),
                                            mSys_System.pUser_ID, mSys_System.pUserName, isupdate
                                            , mSys_System.pFYSDate, mSys_System.pFYEDate, strAuth, mSys_System.pFY_ID);

            if (clsAC_OB.sErrorCode != "")
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErrorCode, false);
                return;
            }
            if (vRet_Val == -1)
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErr_Msg, false);
                return;
            }
            if (vRet_Val == 0)
            {
                clsHomeScreen.Display_Message("ERROR", false);
                return;
            }
            if (vRet_Val == 1)
            {
                clsHomeScreen.Display_Message("SAVE RECORDS SUCCESSFULY", true);
                Fill_Grid();
                return;
            }
        }
Esempio n. 4
0
        private void Fill_Account()
        {
            AC_OB clsAC_OB   = new AC_OB();
            int   vBranch_ID = -1;

            if (lookBranch_ID.EditValue != null)
            {
                vBranch_ID = Convert.ToInt32(lookBranch_ID.EditValue);
            }
            DataSet ds = clsAC_OB.Fill_Account(mSys_System.pComp_ID, vBranch_ID, mSys_System.pUser_ID, chkSub_Ledger.Checked);

            if (clsAC_OB.sErrorCode != "")
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErrorCode, false);
                return;
            }
            Set_Combo(lookAccounts, ds.Tables[0], "Acc_Name", "Acc_ID", true);
        }
Esempio n. 5
0
        private void Find_Record(int vID)
        {
            AC_OB   clsAC_OB = new AC_OB();
            DataSet ds       = clsAC_OB.Find_Record(mSys_System.pComp_ID, mSys_System.pUser_ID, vID);

            if (clsAC_OB.sErrorCode != "")
            {
                clsHomeScreen.Display_Message(clsAC_OB.sErrorCode, false);
                return;
            }
            if (ds.Tables.Count > 0)
            {
                lblOB_ID.Text           = vID.ToString();
                chkSub_Ledger.Checked   = Convert.ToBoolean(ds.Tables[0].Rows[0]["IsSub_Acc"]);
                lookAccounts.EditValue  = ds.Tables[0].Rows[0]["Acc_ID"];
                lookBranch_ID.EditValue = ds.Tables[0].Rows[0]["Branch_ID"];
                txtOB_Dr.Text           = ds.Tables[0].Rows[0]["OB_Dr"].ToString();
                txtOB_Cr.Text           = ds.Tables[0].Rows[0]["OB_Cr"].ToString();
                txtOB_Ref1.Text         = ds.Tables[0].Rows[0]["OB_Ref1"].ToString();
            }
        }