示例#1
0
 public void funSearch()
 {
     try
     {
         strSQL  = "select Package_Id,Package_name as PackageName,";
         strSQL += "(case IsDefault when 1 then 'True' else 'False' end) as IsDefault from tbl_Package order by Package_Id";
         Global.strSearchSqlWidth = "0:200:100";
         Global.strSearchSql      = this.strSQL;
         DataView dv = objDb.GetDataView(strSQL);
         this.strCode = this.objGlobal.openSearch(dv);
         IsEdit       = false;
         if (this.strCode != "")
         {
             this.DisplayRecord(this.strCode);
             ((frmMain)base.MdiParent).setControlState(false, false, this);
             this.TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funSearch() " + exception.ToString());
     }
 }
 public void funSave()
 {
     try
     {
         dtpEntryDate.Value       = DateTime.Now;
         this.objGlobal.strvalues = "";
         this.objGlobal.strfields = "";
         this.objGlobal.strUpdate = "";
         if (checkValidation())
         {
             this.objGlobal.SaveFields(this);
         }
         this.Intcout = this.objGlobal.SaveMasterRecords(this.strMasterTable, "WorkReportId", this.txtWorkReportId.Text, "", this.IsEdit);
         if (this.Intcout > 0)
         {
             MessageBox.Show("Work Report Save", "Work Report save", MessageBoxButtons.OK, MessageBoxIcon.Information);
             ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
             ((frmMain)base.MdiParent).setControlState(false, true, this);
             this.TpLast = ToolbarPositions.eTPOk;
             ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmCommonMaster.funSave() " + exception.ToString());
     }
 }
 public void funSearch()
 {
     try
     {
         tbl_StateCityBAL  objbal     = new tbl_StateCityBAL();
         tbl_StateCityProp objtblProp = new tbl_StateCityProp();
         int      PageCount           = 0;
         DataSet  ds       = objbal.Select_Data(objtblProp, ref PageCount, 00);
         DataView dvSearch = ds.Tables[0].DefaultView;
         Global.strSearchSqlWidth = " 0:200:200 ";
         strCode = objGlobal.openSearch(dvSearch);
         if (strCode != "")
         {
             DisplayRecord(strCode, dvSearch);
             ((frmMain)this.MdiParent).setControlState(false, false, this);
             TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)this.MdiParent).setToolbarPositions(TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funSearch() " + exception.ToString());
     }
 }
示例#4
0
 public void funSave()
 {
     try
     {
         this.objGlobal.strvalues = "";
         this.objGlobal.strfields = "";
         this.objGlobal.strUpdate = "";
         if (ChecckValidation())
         {
             if (this.IsEdit)
             {
                 this.objGlobal.UpdateFields(this);
             }
             else
             {
                 this.objGlobal.SaveFields(this);
             }
             if (chkIsDefault.Checked)
             {
                 if (txtEmailSettingId.Text != "")
                 {
                     strSQL = "UPDATE tbl_EmailSettings set IsDefault=0 where EmailSettingId!=" + txtEmailSettingId.Text;
                 }
                 else
                 {
                     strSQL = "UPDATE tbl_EmailSettings set IsDefault=0 ";
                 }
                 objdb.ExecuteNonQuery(strSQL);
             }
             this.Intcout = this.objGlobal.SaveMasterRecords(this.strMasterTable, "EmailSettingId", this.txtEmailSettingId.Text, "", this.IsEdit);
             if (this.Intcout > 0)
             {
                 //Global.strMasterString = this.txtName.Text;
                 //this.objtransaction2.Commit();
                 this.objGlobal.showMessage("Email Setting", "success", this.IsEdit, this.txtFromEmail);
                 ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
                 ((frmMain)base.MdiParent).setControlState(false, true, this);
                 this.TpLast = ToolbarPositions.eTPOk;
                 ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
                 this.IsEdit = false;
             }
             else
             {
                 //this.objtransaction2.Rollback();
                 this.objGlobal.showMessage("Email Setting", "", this.IsEdit, this.txtFromEmail);
             }
         }
         else
         {
             objGlobal.showMessage("Email Setting", "", IsEdit, txtFromEmail);
             txtFromEmail.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmEmailSetting.funSave() " + exception.ToString());
     }
 }
示例#5
0
 private void frmEmailSetting_Load(object sender, EventArgs e)
 {
     try
     {
         this.TpLast = ToolbarPositions.eTPOk;
         ((frmMain)base.MdiParent).setControlState(false, true, this);
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmEmailSetting.frmEmailSetting_Load() " + exception.ToString());
     }
 }
示例#6
0
 public void funExit()
 {
     try
     {
         this.TpLast = ToolbarPositions.eTPNoAction;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         base.Close();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funExit() " + exception.ToString());
     }
 }
 public void funSave()
 {
     try
     {
         int Intcout = 0;
         if (checkValidation())
         {
             tbl_StateCityProp objtbl_Pro = new tbl_StateCityProp();
             tbl_StateCityBAL  objBAL     = new tbl_StateCityBAL();
             if (IsEdit)
             {
                 objtbl_Pro.StateCityCode = Convert.ToInt32(txtStateCityCode.Text);
                 objtbl_Pro.CountryCode   = Convert.ToInt32(cmbCounteryStateCity.SelectedValue);
                 objtbl_Pro.StateCity     = txtStateCity.Text;
             }
             else
             {
                 objtbl_Pro.StateCityCode = 0;
                 objtbl_Pro.CountryCode   = Convert.ToInt32(cmbCounteryStateCity.SelectedValue);
                 objtbl_Pro.StateCity     = txtStateCity.Text;
             }
             Intcout = objBAL.InsertUpdate_Data(objtbl_Pro);
             if (Intcout > 0)
             {
                 this.objGlobal.showMessage("State/City", "success", this.IsEdit, this.txtStateCity);
                 ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
                 ((frmMain)base.MdiParent).setControlState(false, true, this);
                 this.TpLast = ToolbarPositions.eTPOk;
                 ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
                 this.IsEdit = false;
             }
             else
             {
                 objGlobal.showMessage("State/City", "", IsEdit, txtStateCity);
                 txtStateCity.Focus();
             }
         }
         else
         {
             objGlobal.showMessage("State/City", "", IsEdit, txtStateCity);
             txtStateCity.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funSave() " + exception.ToString());
     }
 }
 public void funSave()
 {
     try
     {
         this.objGlobal.strvalues = "";
         this.objGlobal.strfields = "";
         this.objGlobal.strUpdate = "";
         if (checkValidation())
         {
             if (this.IsEdit)
             {
                 this.objGlobal.UpdateFields(this);
             }
             else
             {
                 this.objGlobal.SaveFields(this);
             }
             //this.objtransaction2 = Global.objConnection.BeginTransaction();
             string Code_Name = txtCode.Tag.ToString().Replace("%", "");
             this.Intcout = this.objGlobal.SaveMasterRecords(this.strMasterTable, Code_Name.ToString(), this.txtCode.Text, "", this.IsEdit);
             if (this.Intcout > 0)
             {
                 //Global.strMasterString = this.txtName.Text;
                 //this.objtransaction2.Commit();
                 this.objGlobal.showMessage(lblFrmName.Text, "success", this.IsEdit, this.txtName);
                 ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
                 ((frmMain)base.MdiParent).setControlState(false, true, this);
                 this.TpLast = ToolbarPositions.eTPOk;
                 ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
                 this.IsEdit = false;
             }
             else
             {
                 //this.objtransaction2.Rollback();
                 this.objGlobal.showMessage(lblFrmName.Text, "", this.IsEdit, this.txtName);
             }
         }
         else
         {
             objGlobal.showMessage(lblFrmName.Text, "", IsEdit, txtName);
             txtName.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmCommonMaster.funSave() " + exception.ToString());
     }
 }
示例#9
0
 public void funSave()
 {
     try
     {
         if (checkValidation())
         {
             this.objGlobal.strvalues = "";
             this.objGlobal.strfields = "";
             this.objGlobal.strUpdate = "";
             if (IsEdit)
             {
                 this.objGlobal.UpdateFields(this);
             }
             else
             {
                 this.objGlobal.SaveFields(this);
             }
             this.Intcout = this.objGlobal.SaveMasterRecords(this.strMasterTable, "Package_Id", this.txtPackageId.Text, "", this.IsEdit);
             if (this.Intcout > 0)
             {
                 if (!SaveDetails(this.Intcout))
                 {
                 }
                 this.objGlobal.showMessage("Package", "success", this.IsEdit, this.txtPackageName);
                 ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
                 ((frmMain)base.MdiParent).setControlState(false, true, this);
                 this.TpLast = ToolbarPositions.eTPOk;
                 ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
                 this.IsEdit = false;
             }
             else
             {
                 objGlobal.showMessage("Package", "", IsEdit, txtPackageName);
                 txtPackageName.Focus();
             }
         }
         else
         {
             objGlobal.showMessage("Package", "", IsEdit, txtPackageName);
             txtPackageName.Focus();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funSave() " + exception.ToString());
     }
 }
示例#10
0
 public void funAdd()
 {
     try
     {
         ((frmMain)base.MdiParent).setControlState(true, true, this);
         this.AutoValidate = AutoValidate.EnableAllowFocusChange;
         this.TpLast       = ToolbarPositions.eTPAdd;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         this.txtFromEmail.Focus();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmEmailSetting.funAdd() " + exception.ToString());
     }
 }
示例#11
0
 public void funClear()
 {
     try
     {
         ((frmMain)base.MdiParent).setControlState(false, true, this);
         this.TpLast = ToolbarPositions.eTPOk;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         this.txtPackageName.Focus();
         this.IsEdit = false;
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funClear() " + exception.ToString());
     }
 }
示例#12
0
 public void funEdit()
 {
     try
     {
         ((frmMain)base.MdiParent).setControlState(true, false, this);
         this.TpLast = ToolbarPositions.eTPEdit;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         IsEdit = true;
         txtFromEmail.Focus();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmEmailSetting.funEdit() " + exception.ToString());
     }
 }
示例#13
0
 private void frmPackages_Load(object sender, EventArgs e)
 {
     try
     {
         this.TpLast = ToolbarPositions.eTPOk;
         ((frmMain)base.MdiParent).setControlState(false, true, this);
         GridDesign(dgvDetails);
         this.cnxMenu.MenuItems.Add("Delete selected Rows", new EventHandler(this.Delete_Selected_Rows));
         this.cnxMenu.MenuItems.Add("Insert Row Above", new EventHandler(this.Insert_Rows_Abvoe));
         this.cnxMenu.MenuItems.Add("Insert Row Below", new EventHandler(this.Insert_Rows_Below));
     }
     catch (Exception ex)
     {
         MessageBox.Show(Convert.ToString(ex.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony." + this.Name + ".frmPackages_Load() " + ex.ToString());
     }
 }
示例#14
0
 public void funEdit()
 {
     try
     {
         ((frmMain)base.MdiParent).setControlState(true, false, this);
         this.TpLast = ToolbarPositions.eTPEdit;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         IsEdit = true;
         this.dgvDetails.HorizontalScrollingOffset = 0;
         this.dgvDetails.RowCount++;
         txtPackageName.Focus();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.funEdit() " + exception.ToString());
     }
 }
 public void funAdd()
 {
     try
     {
         ((frmMain)base.MdiParent).setControlState(true, true, this);
         this.AutoValidate = AutoValidate.EnableAllowFocusChange;
         this.TpLast       = ToolbarPositions.eTPAdd;
         ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         this.ddlEmployee.Focus();
         txtDate.Text       = DateTime.Now.ToString("dd-MM-yyyy");
         dtpEntryDate.Value = DateTime.Now;
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmCommonMaster.funAdd() " + exception.ToString());
     }
 }
示例#16
0
 public void funDelete()
 {
     try
     {
         strSQL  = "Delete from " + strMasterTable + " where Template_Id =" + txtTemplateId.Text;
         Intcout = objDb.ExecuteNonQuery(strSQL);
         if (this.Intcout > 0)
         {
             this.objGlobal.showMessage("Template", "success", this.IsEdit, this.txtTemplateName);
             ((frmMain)base.MdiParent).setToolbarPositions(ToolbarPositions.eTPOk);
             ((frmMain)base.MdiParent).setControlState(false, true, this);
             this.TpLast = ToolbarPositions.eTPOk;
             ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
             this.IsEdit = false;
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmSMSTemplateMaster.funDelete() " + exception.ToString());
     }
 }
 public void funSearch()
 {
     try
     {
         DataSet  ds       = GetSaveList();
         DataView dvSearch = ds.Tables[0].DefaultView;
         Global.strSearchSqlWidth = " 0:200 ";
         strCode = objGlobal.openSearch(dvSearch);
         if (strCode != "")
         {
             DisplayRecord(strCode, dvSearch);
             ((frmMain)this.MdiParent).setControlState(false, false, this);
             TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)this.MdiParent).setToolbarPositions(TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmCommonMaster.funSearch() " + exception.ToString());
     }
 }
示例#18
0
 public void funSearch()
 {
     try
     {
         strSQL = "select EmailSettingId,FromEmail,SMTPServer,(CASE IsDefault WHEN 1 then 'True' else 'False' end) as 'Default' from tbl_EmailSettings";
         Global.strSearchSqlWidth = "0:200:200:100";
         Global.strSearchSql      = this.strSQL;
         DataView dv = objdb.GetDataView(strSQL);
         this.strCode = this.objGlobal.openSearch(dv);
         if (this.strCode != "")
         {
             this.DisplayRecord(this.strCode);
             ((frmMain)base.MdiParent).setControlState(false, false, this);
             this.TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)base.MdiParent).setToolbarPositions(this.TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmEmailSetting.funSearch() " + exception.ToString());
     }
 }
示例#19
0
 public void funSearch()
 {
     try
     {
         strSQL = " Select template_id,TemplateName from " + strMasterTable;
         Global.strSearchSql      = this.strSQL;
         Global.strSearchSqlWidth = " 0:400 ";
         DataView dvSearch = objDb.GetDataView(strSQL);
         strCode = objGlobal.openSearch(dvSearch);
         if (strCode != "")
         {
             DisplayRecord(strCode, dvSearch);
             txtTemplateId.Text = strCode;
             ((frmMain)this.MdiParent).setControlState(false, false, this);
             TpLast = ToolbarPositions.eTPDataDisplayed;
             ((frmMain)this.MdiParent).setToolbarPositions(TpLast);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmSMSTemplateMaster.funSearch() " + exception.ToString());
     }
 }
示例#20
0
        public void setToolbarPositions(ToolbarPositions TP)
        {
            try
            {
                //this.ActiveMdiChild.AutoValidate = AutoValidate.EnableAllowFocusChange;
                switch (TP)
                {
                case ToolbarPositions.eTPNoAction:      //NoAction
                    this.btnToolAdd.Enabled    = false;
                    this.btnToolEdit.Enabled   = false;
                    this.btnToolSave.Enabled   = false;
                    this.btnToolDelete.Enabled = false;
                    this.btnToolSearch.Enabled = false;
                    this.btnToolClear.Enabled  = false;
                    this.btnToolReport.Enabled = false;
                    break;

                case ToolbarPositions.eTPAdd:     //Add
                    this.btnToolAdd.Enabled    = false;
                    this.btnToolEdit.Enabled   = false;
                    this.btnToolSave.Enabled   = true;
                    this.btnToolDelete.Enabled = false;
                    this.btnToolSearch.Enabled = false;
                    this.btnToolClear.Enabled  = true;
                    this.btnToolReport.Enabled = false;
                    break;

                case ToolbarPositions.eTPEdit:     //Edit
                    this.btnToolAdd.Enabled    = false;
                    this.btnToolEdit.Enabled   = false;
                    this.btnToolSave.Enabled   = true;
                    this.btnToolDelete.Enabled = false;
                    this.btnToolSearch.Enabled = false;
                    this.btnToolClear.Enabled  = true;
                    this.btnToolReport.Enabled = false;
                    break;

                case ToolbarPositions.eTPDataDisplayed:     //Data Displayed
                    this.btnToolAdd.Enabled    = true;
                    this.btnToolEdit.Enabled   = true;
                    this.btnToolSave.Enabled   = false;
                    this.btnToolDelete.Enabled = true;
                    this.btnToolSearch.Enabled = true;
                    this.btnToolClear.Enabled  = true;
                    this.btnToolReport.Enabled = true;
                    break;

                case ToolbarPositions.eTPOk:     //Ok
                    this.btnToolAdd.Enabled    = true;
                    this.btnToolEdit.Enabled   = false;
                    this.btnToolSave.Enabled   = false;
                    this.btnToolDelete.Enabled = false;
                    this.btnToolSearch.Enabled = true;
                    this.btnToolClear.Enabled  = true;
                    this.btnToolReport.Enabled = false;
                    break;

                case ToolbarPositions.eTPDelete:     // Delete
                    this.btnToolAdd.Enabled    = true;
                    this.btnToolEdit.Enabled   = false;
                    this.btnToolSave.Enabled   = false;
                    this.btnToolDelete.Enabled = false;
                    this.btnToolSearch.Enabled = true;
                    this.btnToolClear.Enabled  = true;
                    this.btnToolReport.Enabled = false;
                    break;
                }
                if (this.ActiveMdiChild != null)
                {
                    if (Convert.ToString(this.ActiveMdiChild.Tag) != "")
                    {
                        this.btnToolAdd.Enabled    = Convert.ToBoolean(Convert.ToByte(this.ActiveMdiChild.Tag.ToString().Substring(0, 1)));
                        this.btnToolEdit.Enabled   = Convert.ToBoolean(Convert.ToByte(this.ActiveMdiChild.Tag.ToString().Substring(2, 1)));
                        this.btnToolDelete.Enabled = Convert.ToBoolean(Convert.ToByte(this.ActiveMdiChild.Tag.ToString().Substring(4, 1)));
                        this.btnToolSearch.Enabled = Convert.ToBoolean(Convert.ToByte(this.ActiveMdiChild.Tag.ToString().Substring(6, 1)));
                        this.btnToolReport.Enabled = Convert.ToBoolean(Convert.ToByte(this.ActiveMdiChild.Tag.ToString().Substring(8, 1)));
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
                objEventLoging.AppErrlog("Error In VasyERP.MDIMain.setToolbarPositions() " + ex.ToString());
            }
        }
示例#21
0
 private void frmSMSTemplateMaster_Load(object sender, EventArgs e)
 {
     this.TpLast = ToolbarPositions.eTPOk;
     ((frmMain)base.MdiParent).setControlState(false, true, this);
 }
 private void frmWorkReport_Load(object sender, EventArgs e)
 {
     this.TpLast = ToolbarPositions.eTPOk;
     ((frmMain)base.MdiParent).setControlState(false, true, this);
     FillCombo();
 }