Example #1
0
        private void frmComplaintNewEntry_Load(object sender, EventArgs e)
        {
            CommFun.m_sFuncName    = BsfGlobal.GetFunctionalName("Flat");
            label2.Text            = CommFun.m_sFuncName + " No";
            dtCompDate.EditValue   = DateTime.Now;
            dtAttendDate.EditValue = DateTime.Now;
            GetVoucherNo();
            GetData();
            if (BsfGlobal.g_sUnPermissionMode == "H" || BsfGlobal.g_sUnPermissionMode == "D")
            {
                CheckPermission();
            }

            if (BsfGlobal.FindPermission("Complaint-Entry-Modify") == false)
            {
                btnSave.Enabled = false;
            }
            else
            {
                btnSave.Enabled = true;
            }
            if (BsfGlobal.FindPermission("Complaint-Entry-Add") == false)
            {
                btnSave.Enabled = false;
            }
            else
            {
                btnSave.Enabled = true;
            }
            if (m_iComplaintId != 0)
            {
                FillData();
                BsfGlobal.InsertUserUsage("Complaint-Entry-Modify", m_iComplaintId, BsfGlobal.g_sCRMDBName);
            }
        }
Example #2
0
        public void CheckPermission()
        {
            if (BsfGlobal.g_sUnPermissionMode == "H")
            {
                if (BsfGlobal.FindPermission("Followup Setup-Add") == false)
                {
                    barEditItem1.Visibility = BarItemVisibility.Never;
                }
                if (BsfGlobal.FindPermission("Followup Setup-Delete") == false)
                {
                    btnDelete.Visibility = BarItemVisibility.Never;
                }

                else if (BsfGlobal.g_sUnPermissionMode == "D")
                {
                    if (BsfGlobal.FindPermission("Followup Setup-Add") == false)
                    {
                        barEditItem1.Enabled = false;
                    }
                }
                if (BsfGlobal.FindPermission("Followup Setup-Delete") == false)
                {
                    btnDelete.Enabled = false;
                }
            }
        }
Example #3
0
        public void CheckPermission()
        {
            if (BsfGlobal.g_sUnPermissionMode == "H")
            {
                if (BsfGlobal.FindPermission("Target-Modify") == false)
                {
                    btnEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
                if (BsfGlobal.FindPermission("Target-Delete") == false)
                {
                    btnDelete.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
                //if (BsfGlobal.FindPermission("Target-Incentive Generate") == false) btnIncentiveGen.Visibility = BarItemVisibility.Never;
                //if (BsfGlobal.FindPermission("Target-Incentive Details") == false) btnIncentiveDet.Visibility = BarItemVisibility.Never;

                else if (BsfGlobal.g_sUnPermissionMode == "D")
                {
                    if (BsfGlobal.FindPermission("Target-Modify") == false)
                    {
                        btnEdit.Enabled = false;
                    }
                }
                if (BsfGlobal.FindPermission("Target-Delete") == false)
                {
                    btnDelete.Enabled = false;
                }
                //if (BsfGlobal.FindPermission("Target-Incentive Generate") == false) btnIncentiveGen.Enabled = false;
                //if (BsfGlobal.FindPermission("Target-Incentive Details") == false) btnIncentiveDet.Enabled = false;
            }
        }
Example #4
0
 private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Post-Followup-Delete") == false)
     {
         MessageBox.Show("You don't have Rights to Post-Followup-Delete");
         return;
     }
     if (grdViewCall.FocusedRowHandle < 0)
     {
         return;
     }
     try
     {
         int iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId"));
         if (MessageBox.Show("Do you want to delete?", "Confirm delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             CallSheetEntryBL.DeleteFollowUp(iEntryId);
             grdViewCall.DeleteRow(grdViewCall.FocusedRowHandle);
             BsfGlobal.InsertLog(DateTime.Now, "Post-Followup-Delete", "D", "Post-Followup", iEntryId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #5
0
        public void CheckPermission()
        {
            if (BsfGlobal.g_sUnPermissionMode == "H")
            {
                if (BsfGlobal.FindPermission("Reset Password-Reset") == false)
                {
                    barButtonItem2.Visibility = BarItemVisibility.Never;
                }
                if (BsfGlobal.FindPermission("Update to WEB-Modify") == false)
                {
                    barButtonItem3.Visibility = BarItemVisibility.Never;
                }

                else if (BsfGlobal.g_sUnPermissionMode == "D")
                {
                    if (BsfGlobal.FindPermission("Reset Password-Reset") == false)
                    {
                        barButtonItem2.Enabled = false;
                    }
                }
                if (BsfGlobal.FindPermission("Update to WEB-Modify") == false)
                {
                    barButtonItem3.Enabled = false;
                }
            }
        }
Example #6
0
        private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Location-Delete") == false)
            {
                MessageBox.Show("No Rights to Location-Edit");
                return;
            }


            bool status = false;
            int  CityId = Convert.ToInt32(TransView.GetFocusedRowCellValue("CityId"));

            status = m_oCity.CheckCity(CityId);

            if (status == false)
            {
                MessageBox.Show("Already Used, Do Not Delete", "Vendor", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (reply == DialogResult.Yes)
                {
                    m_oCity.DeleteCity(CityId);
                    TransView.DeleteRow(TransView.FocusedRowHandle);
                }
            }
        }
Example #7
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Stage Details-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Stage Details-Modify");
                return;
            }
            if (grdViewStage.FocusedRowHandle >= 0)
            {
                int StageId = Convert.ToInt32(grdViewStage.GetFocusedRowCellValue("StageDetId"));
                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdViewStage;
                    m_oGridMasterView.FocusedRowHandle = grdViewStage.FocusedRowHandle;
                    frmStageEntry frm = new frmStageEntry();
                    frm.Execute("E", StageId);
                }
                else
                {
                    CommFun.DW1.Hide();
                    frmStageEntry frmCompEntry = new frmStageEntry();
                    CommFun.DW2.Text      = "Stage Entry";
                    frmCompEntry.TopLevel = false;
                    CommFun.RP2.Controls.Clear();
                    frmCompEntry.FormBorderStyle = FormBorderStyle.None;
                    frmCompEntry.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frmCompEntry);
                    frmCompEntry.Execute("E", StageId);
                    CommFun.DW2.Show();
                }
            }

            FillStages();
        }
Example #8
0
        private void btnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (DGvTransView.FocusedRowHandle < 0)
            {
                return;
            }

            if (BsfGlobal.FindPermission("Bank-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Bank-Modify");
                return;
            }

            int           iBranchId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("BranchId"));
            frmBankMaster frmBank   = new frmBankMaster();

            //frmBank.Execute(iBranchId, "E");
            //fillData();
            if (frmBank.Execute(iBranchId) == true)
            {
                dt = BankBL.GetBankBranchReg(iBranchId);
                if (dt.Rows.Count > 0)
                {
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "BankName", dt.Rows[0]["BankName"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "Branch", dt.Rows[0]["Branch"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "IFSCCode", dt.Rows[0]["IFSCCode"].ToString());
                    DGvTransView.SetRowCellValue(DGvTransView.FocusedRowHandle, "IntRate", dt.Rows[0]["IntRate"].ToString());
                }
                dt.Dispose();
            }
        }
Example #9
0
        private void toolStripDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Vendor-Grade-Master-Delete") == false)
            {
                MessageBox.Show("No Rights to Vendor-Grade-Master-Delete");
                return;
            }

            if (TransView.FocusedRowHandle >= 0)
            {
                if (TransView.IsNewItemRow(TransView.FocusedRowHandle) == true)
                {
                    return;
                }
                if (TransView.FocusedRowHandle != TransView.RowCount - 2)
                {
                    return;
                }

                DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (reply == DialogResult.Yes)
                {
                    int Id = 0;
                    Id = Convert.ToInt32(TransView.GetRowCellValue(TransView.FocusedRowHandle, "GradeId"));
                    m_oGrade.DeleteGrade(Id);
                    //grdTrans.Rows.RemoveAt(grdTrans.CurrentRow.Index);
                    TransView.DeleteRow(TransView.FocusedRowHandle);
                }
            }
        }
Example #10
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Template Documents-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Template Documents-Delete");
                return;
            }
            if (grdViewTemp.FocusedRowHandle < 0)
            {
                return;
            }
            int iTempId = Convert.ToInt32(grdViewTemp.GetRowCellValue(grdViewTemp.FocusedRowHandle, "TemplateId").ToString());

            if (oTempBL.CheckTemplateUsed(iTempId) == true)
            {
                MessageBox.Show("Template Already Used, Do not Delete");
                return;
            }
            DialogResult reply = MessageBox.Show("Do you want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (reply == DialogResult.Yes)
            {
                oTempBL.DeleteTempate(iTempId);
                grdViewTemp.DeleteRow(grdViewTemp.FocusedRowHandle);
            }
        }
        private void btnAdd_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("ExtraItem Register-Add") == false)
            {
                MessageBox.Show("You don't have Rights to ExtraItem Register-Add");
                return;
            }
            frmExtraItemMasterEntry frm = new frmExtraItemMasterEntry();

            //if (BsfGlobal.g_bWorkFlow == true)
            //{

            //    BsfGlobal.g_bTrans = true;
            //    oPanel = BsfGlobal.GetPanel(frm, "ExtraItemMaster Entry");
            //    if (oPanel != null)
            //    {
            //        oPanel.Controls.Clear();
            //        frm.TopLevel = false;
            //        frm.FormBorderStyle = FormBorderStyle.None;
            //        frm.Dock = DockStyle.Fill;
            //        oPanel.Controls.Add(frm);
            //        oPanel.Visible = true;
            //        Cursor.Current = Cursors.Default;
            //    }
            //}
            //else
            //{
            //    frm.ExtraItemId = 0;
            //}
            if (frm.Execute(0, "") == true)
            {
                FillData();
            }
        }
        private void btnDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("ExtraItem Register-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to ExtraItem Register-Delete");
                return;
            }

            try
            {
                if (grdExtraView.FocusedRowHandle >= 0)
                {
                    string sql;
                    if (MessageBox.Show("Do you want to delete?", "Confirm delete", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        sql = String.Format("DELETE FROM ExtraItemMaster where ExtraItemId={0}", Convert.ToInt32(grdExtraView.GetFocusedRowCellValue("ExtraItemId")));
                        CommFun.CRMExecute(sql);

                        grdExtraView.DeleteRow(grdExtraView.FocusedRowHandle);
                        //CommFun.InsertLog(DateTime.Now, "ExtraItem Register-Delete", "D", "Delete ExtraItem Register", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                        BsfGlobal.InsertLog(DateTime.Now, "ExtraItem Register-Delete", "D", "Delete ExtraItem Register", Convert.ToInt32(grdExtraView.GetFocusedRowCellValue("ExtraItemId")), 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Example #13
0
 private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Lead-Delete") == false)
     {
         MessageBox.Show("You don't have Rights to Lead-Delete");
         return;
     }
     try
     {
         if (DGvTransView.FocusedRowHandle >= 0)
         {
             if (Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId")) == 0)
             {
                 string sql = string.Empty;
                 sql = "DELETE FROM LeadRegister WHERE LeadId=" + Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId")) + " ";
                 CommFun.CRMExecute(sql);
                 DGvTransView.DeleteRow(DGvTransView.FocusedRowHandle);
                 //CommFun.InsertLog(DateTime.Now, "Lead Details-Delete", "D", "Delete Lead Details", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                 BsfGlobal.InsertLog(DateTime.Now, "Lead Details-Delete", "D", "Delete Lead Details", Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("LeadId")), 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
             }
             else
             {
                 MessageBox.Show("Already Converted Can't Delete", "CRM");
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #14
0
        public void CheckPermission()
        {
            if (BsfGlobal.g_sUnPermissionMode == "H")
            {
                if (BsfGlobal.FindPermission("Document Template-Add") == false)
                {
                    barEditItem1.Visibility = BarItemVisibility.Never;
                }
                if (BsfGlobal.FindPermission("Document Template-Delete") == false)
                {
                    barButtonItem1.Visibility = BarItemVisibility.Never;
                }

                else if (BsfGlobal.g_sUnPermissionMode == "D")
                {
                    if (BsfGlobal.FindPermission("Document Template-Add") == false)
                    {
                        barEditItem1.Enabled = false;
                    }
                }
                if (BsfGlobal.FindPermission("Document Template-Delete") == false)
                {
                    barButtonItem1.Enabled = false;
                }
            }
        }
Example #15
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Stage Details-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Stage Details-Delete");
                return;
            }

            if (grdViewStage.FocusedRowHandle >= 0)
            {
                int  iStageDetId = Convert.ToInt32(grdViewStage.GetFocusedRowCellValue("StageDetId").ToString());
                bool b_PB        = UnitDirBL.CheckPBStage(iStageDetId);
                if (b_PB == true)
                {
                    MessageBox.Show("Progress Bill Raised, Could not Delete", "Delete", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    return;
                }

                DialogResult result1 = MessageBox.Show("Are you sure", "Stage Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result1 == DialogResult.Yes)
                {
                    UnitDirBL.DeleteStage(iStageDetId);
                    grdViewStage.DeleteRow(grdViewStage.FocusedRowHandle);
                }
            }
        }
Example #16
0
 public void CheckPermission()
 {
     if (BsfGlobal.g_sUnPermissionMode == "H")
     {
         if (BsfGlobal.FindPermission("Bank-Add") == false)
         {
             btnAdd.Visibility = BarItemVisibility.Never;
         }
         if (BsfGlobal.FindPermission("Bank-Modify") == false)
         {
             btnEdit.Visibility = BarItemVisibility.Never;
         }
         if (BsfGlobal.FindPermission("Bank-Delete") == false)
         {
             btnDelete.Visibility = BarItemVisibility.Never;
         }
         else if (BsfGlobal.g_sUnPermissionMode == "D")
         {
             if (BsfGlobal.FindPermission("Bank-Add") == false)
             {
                 btnAdd.Enabled = false;
             }
         }
         if (BsfGlobal.FindPermission("Bank-Modify") == false)
         {
             btnEdit.Enabled = false;
         }
         if (BsfGlobal.FindPermission("Bank-Delete") == false)
         {
             btnDelete.Enabled = false;
         }
     }
 }
Example #17
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (grdBrokerView.FocusedRowHandle < 0)
            {
                return;
            }

            if (BsfGlobal.FindPermission("Broker Details-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Broker-Modify");
                return;
            }

            int          iBrokerId = Convert.ToInt32(grdBrokerView.GetFocusedRowCellValue("BrokerId"));
            int          iVendorId = Convert.ToInt32(grdBrokerView.GetFocusedRowCellValue("VendorId"));
            frmBrokerDet frmBr     = new frmBrokerDet();

            if (frmBr.Execute(iBrokerId, iVendorId) == true)
            {
                string sql = "SELECT BrokerId,A.VendorId,B.VendorName BrokerName " +
                             " FROM BrokerDet A Inner Join [" + BsfGlobal.g_sVendorDBName + "].dbo.VendorMaster B On A.VendorId=B.VendorId" +
                             " Where BrokerId= " + iBrokerId;
                DataTable dt = new DataTable();
                dt = CommFun.FillRecord(sql);
                grdBrokerView.Columns["BrokerId"].Visible = false;
                grdBrokerView.Columns["VendorId"].Visible = false;
                if (dt.Rows.Count > 0)
                {
                    grdBrokerView.SetRowCellValue(grdBrokerView.FocusedRowHandle, "BrokerName", dt.Rows[0]["BrokerName"].ToString());
                }

                dt.Dispose();
            }
        }
Example #18
0
        private void btnDel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Area Master-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Area Master-Delete");
                return;
            }

            int  iAreaId = Convert.ToInt32(CommFun.IsNullCheck(grdAreaView.GetFocusedRowCellValue("AreaId"), CommFun.datatypes.vartypenumeric));
            bool bAns    = false;

            bAns = UnitDirBL.FoundArea(iAreaId);

            if (bAns == true)
            {
                MessageBox.Show("Do not Delete, Area Already Used"); return;
            }

            DialogResult result1 = MessageBox.Show("Are you sure", "Area Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result1 == DialogResult.Yes)
            {
                UnitDirBL.DeleteAreaMaster(iAreaId);
                grdAreaView.DeleteSelectedRows();
            }
        }
Example #19
0
        public void CheckPermission()
        {
            if (BsfGlobal.g_sUnPermissionMode == "H")
            {
                if (BsfGlobal.FindPermission("Check List-Add") == false)
                {
                    cboTypeName.Visibility = BarItemVisibility.Never;
                }
                if (BsfGlobal.FindPermission("Check List-Delete") == false)
                {
                    btnDelete.Visibility = BarItemVisibility.Never;
                }

                else if (BsfGlobal.g_sUnPermissionMode == "D")
                {
                    if (BsfGlobal.FindPermission("Check List-Add") == false)
                    {
                        cboTypeName.Enabled = false;
                    }
                }
                if (BsfGlobal.FindPermission("Check List-Delete") == false)
                {
                    btnDelete.Enabled = false;
                }
            }
        }
Example #20
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (grdAmenitiesMasterView.FocusedRowHandle < 0)
            {
                return;
            }
            if (BsfGlobal.FindPermission("Amenities Master-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Amenities Master-Delete");
                return;
            }
            int iAId = Convert.ToInt32(CommFun.IsNullCheck(grdAmenitiesMasterView.GetRowCellValue(grdAmenitiesMasterView.FocusedRowHandle, "AmenityId").ToString(), CommFun.datatypes.vartypenumeric));

            if (ProjectInfoDL.CheckAmenityUsed(iAId) == true)
            {
                MessageBox.Show("Amenity Used, Do not Delete");
                return;
            }

            if (MessageBox.Show("Do You want to Delete Row?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                ProjectInfoDL.DeleteAmenitiesMaster(iAId);
                grdAmenitiesMasterView.DeleteRow(grdAmenitiesMasterView.FocusedRowHandle);
            }
        }
Example #21
0
        private void barbtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Lead-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Lead-Delete");
                return;
            }

            m_iLeadId = Convert.ToInt32(grdLeadRegView.GetFocusedRowCellValue("LeadId"));
            bool bAns = NewLeadBL.FoundLeadDetils(m_iLeadId);

            if (bAns == true)
            {
                MessageBox.Show("Transaction Exists", "Lead", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            bool bFinalised = BusinessLayer.CallSheetEntryBL.GetFinalisedFlat(0, m_iLeadId);

            if (bFinalised == true)
            {
                MessageBox.Show("Do not delete Finalise Lead", "Lead", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MessageBox.Show("Do You Want Delete?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
            {
                if (NewLeadBL.Delete_LeadDetils(m_iLeadId) == true)
                {
                    grdLeadRegView.DeleteRow(grdLeadRegView.FocusedRowHandle);
                }
            }
        }
Example #22
0
        private void btnDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (DGvTransView.FocusedRowHandle < 0)
            {
                return;
            }
            if (BsfGlobal.FindPermission("Bank-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to Bank-Delete");
                return;
            }

            int iBranchId = Convert.ToInt32(DGvTransView.GetFocusedRowCellValue("BranchId"));

            if (BankBL.BankFound(iBranchId) == false)
            {
                if (MessageBox.Show("Do You want to Delete?", "Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    BankBL.DeleteBankBranch(iBranchId);
                    DGvTransView.DeleteRow(DGvTransView.FocusedRowHandle);
                    //CommFun.InsertLog(DateTime.Now, "Bank Master-Delete", "D", "Delete Bank Master", BsfGlobal.g_lUserId, 0, 0, 0, BsfGlobal.g_sCRMDBName);
                    BsfGlobal.InsertLog(DateTime.Now, "Bank Master-Delete", "D", "Delete Bank Master", iBranchId, 0, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId);
                }
            }
            else
            {
                MessageBox.Show("Bank Details Used, Can't Delete Row", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
        }
Example #23
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Post-Followup-Modify") == false)
            {
                MessageBox.Show("You don't have Rights to Post-Followup-Modify");
                return;
            }
            //bar1.Visible = false;
            if (grdViewCall.FocusedRowHandle >= 0)
            {
                int iEntryId = 0;
                iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString());
                frmFollowUp frm = new frmFollowUp()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView = grdViewCall;
                    m_oGridMasterView.FocusedRowHandle = grdViewCall.FocusedRowHandle;
                    BsfGlobal.g_bTrans = true;
                    m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frm, "Post-FollowUp Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frm);
                    frm.Execute(iEntryId, "E");
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    iEntryId = Convert.ToInt32(grdViewCall.GetFocusedRowCellValue("EntryId").ToString());
                    CommFun.DW1.Hide();
                    frm = new frmFollowUp();
                    CommFun.DW2.Text = "Post-FollowUp Entry";
                    frm.TopLevel     = false;
                    CommFun.RP2.Controls.Clear();
                    frm.FormBorderStyle = FormBorderStyle.None;
                    frm.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frm);
                    frm.Execute(iEntryId, "E");
                    CommFun.DW2.Show();
                    //Cursor.Current = Cursors.WaitCursor;
                    //panelControl1.Controls.Clear();
                    //panelControl1.Controls.Add(frm);
                    //frm.Execute(iEntryId,"E");
                    //Cursor.Current = Cursors.Default;
                }
            }
        }
Example #24
0
 private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Buyer-Receipt-Cash-Delete") == false)
     {
         MessageBox.Show("You don't have Rights to Buyer-Receipt-Cash-Delete");
         return;
     }
 }
Example #25
0
 private void btnVenDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (BsfGlobal.FindPermission("Vendor-Delete") == false)
     {
         MessageBox.Show("No Rights to Delete Vendor", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
 }
Example #26
0
        private void btnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            string sSql;

            if (BsfGlobal.FindPermission("OC Master-Delete") == false)
            {
                MessageBox.Show("You don't have Rights to OC Template-Delete");
                return;
            }
            if (Convert.ToBoolean(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("SysDefault"), CommFun.datatypes.vartypenumeric)) == true)
            {
                MessageBox.Show("Do not Delete,Default OtherCost"); return;
            }
            else
            {
                int  iOCId = Convert.ToInt32(CommFun.IsNullCheck(DGvTransView.GetFocusedRowCellValue("OtherCostId"), CommFun.datatypes.vartypenumeric));
                bool bAns  = false;
                sSql = " Select OtherCostId From CCOtherCost Where OtherCostId= " + iOCId + " " +
                       " Union All " +
                       " Select OtherCostId From FlatTypeOtherCost Where OtherCostId= " + iOCId + " " +
                       " Union All " +
                       " Select OtherCostId From FlatOtherCost Where OtherCostId = " + iOCId + " " +
                       " Union All " +
                       " Select OtherCostId From PaymentSchedule Where OtherCostId = " + iOCId + " AND SchType IN('O') " +
                       " Union All " +
                       " Select OtherCostId From PaymentScheduleFlat Where OtherCostId = " + iOCId + " AND SchType IN('O') " +
                       " Union All " +
                       " Select StageId From StageDetails Where StageId = " + iOCId + " AND SchType IN('O') " +
                       " Union All " +
                       " Select StageId From ProgressBillRegister Where StageId = " + iOCId + " AND SchType IN('O') ";
                DataTable      dt  = new DataTable();
                SqlDataAdapter sda = new SqlDataAdapter(sSql, BsfGlobal.OpenCRMDB());
                sda.Fill(dt);
                if (dt.Rows.Count > 0)
                {
                    bAns = true;
                }
                dt.Dispose();
                sda.Dispose();
                BsfGlobal.g_CRMDB.Close();
                if (bAns == true)
                {
                    MessageBox.Show("Do not Delete, OtherCost Already Used"); return;
                }

                DialogResult result1 = MessageBox.Show("Are you sure", "OtherCost Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result1 == DialogResult.Yes)
                {
                    sSql = String.Format("DELETE FROM OtherCostMaster WHERE OtherCostId={0}", iOCId);
                    using (SqlCommand cmd = new SqlCommand(sSql, BsfGlobal.OpenCRMDB()))
                    {
                        cmd.ExecuteNonQuery();
                        DGvTransView.DeleteSelectedRows();
                    }
                }
            }
        }
Example #27
0
        private void EditVendor()
        {
            if (BsfGlobal.FindPermission("Vendor-Master-Edit") == false)
            {
                MessageBox.Show("No Rights to Vendor-Master-Edit");
                return;
            }

            if (VendorView.FocusedRowHandle < 0)
            {
                return;
            }
            int iVendorId = Convert.ToInt32(VendorView.GetRowCellValue(VendorView.FocusedRowHandle, "VendorId").ToString());

            VendorName = VendorView.GetFocusedRowCellValue("VendorName").ToString();
            int i = VendorView.RowCount - 1;

            if (BsfGlobal.g_bWorkFlow == true)
            {
                //try { this.Parent.Controls.Owner.Hide(); }
                //catch { }
                m_oGridMasterView = VendorView;
                m_oGridMasterView.FocusedRowHandle = VendorView.FocusedRowHandle;
                iRowId = VendorView.FocusedRowHandle;
                BsfGlobal.g_bWorkFlow = true;
                frmMain frm = new frmMain();
                frm.m_lVendorId   = iVendorId;
                frm.m_sVendorName = VendorName;
                m_oDW             = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                m_oDW.Hide();
                DevExpress.XtraEditors.PanelControl oPanel = new DevExpress.XtraEditors.PanelControl();
                oPanel = BsfGlobal.GetPanel(frm, "Vendor Details");
                if (oPanel != null)
                {
                    oPanel.Controls.Clear();
                    frm.TopLevel        = false;
                    frm.FormBorderStyle = FormBorderStyle.None;
                    frm.Dock            = DockStyle.Fill;
                    oPanel.Controls.Add(frm);
                    frm.Execute();

                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
            }
            else
            {
                Cursor.Current = Cursors.WaitCursor;
                frmMain frm = new frmMain();
                frm.m_lVendorId   = iVendorId;
                frm.m_sVendorName = VendorName;
                frm.Execute();
                Cursor.Current = Cursors.Default;
            }
            m_bAdd   = true;
            m_iRowId = VendorView.FocusedRowHandle;
        }
Example #28
0
 private void frmAreaMaster_Load(object sender, EventArgs e)
 {
     if (BsfGlobal.FindPermission("Area Master-Add") == false)
     {
         MessageBox.Show("You don't have Rights to Area Master-Add");
         return;
     }
     FillData();
 }
Example #29
0
        private void btnDelete_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                if (grdPBRegView.FocusedRowHandle >= 0)
                {
                    if (BsfGlobal.FindPermission("Progress Bill-Delete") == false)
                    {
                        MessageBox.Show("You don't have Rights to Progress Bill-Delete");
                        return;
                    }

                    int iProgRegId = Convert.ToInt32(grdPBRegView.GetRowCellValue(grdPBRegView.FocusedRowHandle, "ProgRegId"));
                    int iCCId      = Convert.ToInt32(grdPBRegView.GetRowCellValue(grdPBRegView.FocusedRowHandle, "CostCentreId"));

                    bool bAns = ProgBillBL.GetApprFound(iProgRegId, iCCId);
                    if (bAns == true)
                    {
                        MessageBox.Show("Bill Approved, Do not Delete");
                        return;
                    }

                    bAns = ProgBillBL.GetReceiptRaised(iProgRegId, iCCId);
                    if (bAns == true)
                    {
                        MessageBox.Show("Receipt Raised, Could not Delete");
                        return;
                    }

                    DialogResult Result;
                    Result = MessageBox.Show("Do you Want to Delete?", "CRM", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                    if (Result == DialogResult.Yes)
                    {
                        if (m_sBussinessType == "B")
                        {
                            ProgBillBL.DeletePBillMaster(iProgRegId);
                            grdPBRegView.DeleteRow(grdPBRegView.FocusedRowHandle);
                            grdPBTransView.DeleteRow(grdPBTransView.FocusedRowHandle);
                            BsfGlobal.InsertLog(DateTime.Now, "Progress Bill-Delete", "D", "Progress Bill", iProgRegId, iCCId, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId, 0, 0);
                        }
                        else
                        {
                            ProgBillBL.DeletePlotPBillMaster(iProgRegId);
                            grdPBRegView.DeleteRow(grdPBRegView.FocusedRowHandle);
                            grdPBTransView.DeleteRow(grdPBTransView.FocusedRowHandle);
                            BsfGlobal.InsertLog(DateTime.Now, "Plot-Progress-Bill-Delete", "D", "Plot Progress Bill", iProgRegId, iCCId, 0, BsfGlobal.g_sCRMDBName, "", BsfGlobal.g_lUserId, 0, 0);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                BsfGlobal.CustomException(ex.Message, ex.StackTrace);
            }
        }
Example #30
0
        private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (BsfGlobal.FindPermission("Buyer-Receipt-Cash-Edit") == false)
            {
                MessageBox.Show("You don't have Rights to Buyer-Receipt-Cash-Edit");
                return;
            }
            if (grdCashView.FocusedRowHandle >= 0)
            {
                int RegId = 0;
                RegId = Convert.ToInt32(grdCashView.GetFocusedRowCellValue("CashReceiptId").ToString());
                string       sType        = grdCashView.GetFocusedRowCellValue("Type").ToString();
                frmCashEntry frmCashEntry = new frmCashEntry()
                {
                    TopLevel = false, FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill
                };

                if (BsfGlobal.g_bWorkFlow == true)
                {
                    m_oGridMasterView            = grdCashView;
                    grdCashView.FocusedRowHandle = grdCashView.FocusedRowHandle;
                    BsfGlobal.g_bTrans           = true;
                    m_oDW = (Telerik.WinControls.UI.Docking.DocumentWindow)BsfGlobal.g_oDock.ActiveWindow;
                    m_oDW.Hide();
                    BsfGlobal.g_bTrans = false;
                    Cursor.Current     = Cursors.WaitCursor;
                    PanelControl oPanel = new PanelControl();
                    oPanel = BsfGlobal.GetPanel(frmCashEntry, "Cash Receipt Entry");
                    if ((oPanel == null))
                    {
                        return;
                    }
                    oPanel.Controls.Clear();
                    oPanel.Controls.Add(frmCashEntry);
                    frmCashEntry.Execute(RegId, sType);
                    oPanel.Visible = true;
                    Cursor.Current = Cursors.Default;
                }
                else
                {
                    RegId = Convert.ToInt32(grdCashView.GetFocusedRowCellValue("CashReceiptId").ToString());
                    CommFun.DW1.Hide();
                    frmCashEntry frmCompEntry = new frmCashEntry();
                    CommFun.DW2.Text      = " Cash Receipt Entry";
                    frmCompEntry.TopLevel = false;
                    CommFun.RP2.Controls.Clear();
                    frmCompEntry.FormBorderStyle = FormBorderStyle.None;
                    frmCompEntry.Dock            = DockStyle.Fill;
                    CommFun.RP2.Controls.Add(frmCompEntry);
                    frmCompEntry.Execute(RegId, sType);
                    CommFun.DW2.Show();
                }
            }
            Close();
        }