public bool UpdateSendStatus(int MemberCode)
 {
     try
     {
         strSql = " UPDATE tbl_membermaster SET Married=0 WHERE MemberCode=" + MemberCode;
         int Res = objDb.ExecuteNonQuery(strSql);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(Convert.ToString(ex.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmMarriedConfirmation.btnSendEmail_Click() " + ex.ToString());
         return(false);
     }
 }
 private void btnSaveSettings_Click(object sender, EventArgs e)
 {
     try
     {
         string strPartnerData = "";
         for (int i = 0; i < chkPMaritalStatus.CheckedItems.Count; i++)
         {
             strPartnerData += ((System.Data.DataRowView)(chkPMaritalStatus.CheckedItems[i])).Row.ItemArray[0] + ",";
         }
         strPartnerData = strPartnerData.TrimEnd(',');
         strSql         = "UPDATE tbl_membermaster SET AgeDiff=" + txtAgeDiff.Text + ", MStatus_Preference='" + strPartnerData + "' WHERE ProfileId='" + txtProfileId.Text + "'";
         if (objDb.ExecuteNonQuery(strSql) > 0)
         {
             MessageBox.Show("Setting Updated", "Setting", MessageBoxButtons.OK, MessageBoxIcon.Information);
             txtAgeDiff.Text   = "";
             txtProfileId.Text = "";
             for (int i = 0; i < chkPMaritalStatus.Items.Count; i++)
             {
                 chkPMaritalStatus.SetItemCheckState(i, CheckState.Unchecked);
             }
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 3
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());
     }
 }
Exemplo n.º 4
0
 public bool SaveDetails(int PackageId)
 {
     try
     {
         if (IsEdit)
         {
             PackageId = Convert.ToInt32(txtPackageId.Text);
             strSQL    = "Delete from tbl_package_details where Package_Id = " + PackageId;
             objDb.ExecuteNonQuery(strSQL);
         }
         int Res = 0;
         for (int cnt = 0; cnt < dgvDetails.Rows.Count; cnt++)
         {
             if (Convert.ToString(dgvDetails[(int)CI.MembershipName, cnt].Value) != "")
             {
                 string MembershipName = Convert.ToString(dgvDetails[(int)CI.MembershipName, cnt].Value);
                 double Amount         = Convert.ToDouble(dgvDetails[(int)CI.Amount, cnt].Value);
                 string Remark         = Convert.ToString(dgvDetails[(int)CI.Description, cnt].Value);
                 strSQL  = "INSERT INTO tbl_Package_Details (Package_Details_Id,Package_Id,Membership_name,Amount,Remark)VALUES";
                 strSQL += "(" + (cnt + 1) + "," + PackageId + ",'" + MembershipName.Trim() + "'," + Amount + ",'" + Remark + "')";
                 Res     = objDb.ExecuteNonQuery(strSQL);
             }
         }
         if (chkIsDefault.Checked)
         {
             strSQL = "UPDATE tbl_Package SET IsDefault=0 WHERE Package_Id!=" + PackageId;
             objDb.ExecuteNonQuery(strSQL);
         }
         if (Res <= 0)
         {
             return(false);
         }
         return(true);
     }
     catch (Exception exception)
     {
         MessageBox.Show(Convert.ToString(exception.Message));
         this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmStateCity.SaveDetails() " + exception.ToString());
         return(false);
     }
 }
 private void btnStart_Click(object sender, EventArgs e)
 {
     try
     {
         string    strSql    = " select * from tbl_ProfilevisitLog where isnull(flag,0)=0 ";
         DataTable dtDetails = objDb.GetDataTable(strSql);
         if (dtDetails.Rows.Count > 0)
         {
             richTextBox1.Text  = "Total Count :" + dtDetails.Rows.Count;
             richTextBox1.Text += Environment.NewLine;
             for (int cnt = 0; cnt < dtDetails.Rows.Count; cnt++)
             {
                 int      MemberCode         = Convert.ToInt32(dtDetails.Rows[cnt]["MemberCode"]);
                 string   VisitProfileId     = Convert.ToString(dtDetails.Rows[cnt]["VisitProfileId"]);
                 string[] VisitProfileId_arr = VisitProfileId.Split(',');
                 richTextBox1.Text += "Member Code :" + MemberCode;
                 richTextBox1.Text += Environment.NewLine;
                 if (VisitProfileId_arr.Length > 0)
                 {
                     richTextBox1.Text += "Total Profile :" + VisitProfileId_arr.Length;
                     richTextBox1.Text += Environment.NewLine;
                     for (int icnt = 0; icnt < VisitProfileId_arr.Length; icnt++)
                     {
                         strSql  = " INSERT INTO tbl_ProfilevisitLog_new (MemberCode,ProfileId) VALUES (";
                         strSql += MemberCode + ",'" + VisitProfileId_arr[icnt] + "')";
                         objDb.ExecuteNonQuery(strSql);
                     }
                     richTextBox1.Text += "Profile transferd :" + MemberCode;
                     richTextBox1.Text += Environment.NewLine;
                     strSql             = " UPDATE tbl_ProfilevisitLog SET flag=1 WHERE MemberCode=" + MemberCode;
                     objDb.ExecuteNonQuery(strSql);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public int InsertSearchLog(string SearchVal, string SearchName, DateTime SearchDatetime, int UserId)
 {
     try
     {
         string strSql = " INSERT INTO tbl_MemberSearchListLog (SearchVal,SearchName,SearchDatetime,UserId) VALUES (";
         strSql += "'" + SearchVal + "','" + SearchName + "','" + SearchDatetime.ToString("dd-MMM-yyyy HH:mm:ss") + "'," + UserId + " )";
         return(objdb.ExecuteNonQuery(strSql));
     }
     catch (Exception ex)
     {
         throw ex;
         return(0);
     }
 }
Exemplo n.º 7
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());
     }
 }
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtMobileNo.Text == "")
                {
                    MessageBox.Show("Please Enter Mobile number1", "Mobile Number1 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtMobileNo.Focus();
                    return;
                }
                else
                {
                    if (Convert.ToInt32(ddlMobileNo_Rel.SelectedValue) <= 0)
                    {
                        MessageBox.Show("Please Select Mobile Number 1 Relation", "Mobile Number 1 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        ddlMobileNo_Rel.Focus();
                        return;
                    }
                }
                if (txtMobileNo1.Text == "")
                {
                    MessageBox.Show("Please Enter Mobile number2", "Mobile Number2 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtMobileNo1.Focus();
                    return;
                }
                else
                {
                    if (Convert.ToInt32(ddlMobileNo1_Rel.SelectedValue) <= 0)
                    {
                        MessageBox.Show("Please Select Mobile Number 2 Relation", "Mobile Number 2 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        ddlMobileNo_Rel.Focus();
                        return;
                    }
                }

                if (txtLandlineNo.Text != "")
                {
                    if (Convert.ToInt32(ddlMobileNo2_Rel.SelectedValue) <= 0)
                    {
                        MessageBox.Show("Please Select Mobile Number 3 Relation", "Mobile Number 3 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        ddlMobileNo2_Rel.Focus();
                        return;
                    }
                }
                if (txtLandlineNo1.Text != "")
                {
                    if (Convert.ToInt32(ddlLandlineNo1_Rel.SelectedValue) <= 0)
                    {
                        MessageBox.Show("Please Select Mobile Number 4 Relation", "Mobile Number 4 validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        ddlLandlineNo1_Rel.Focus();
                        return;
                    }
                }
                if (lblMemberCode.Text != "")
                {
                    strSql = " UPDATE tbl_membermaster SET MobileNo='" + txtMobileNo.Text.Trim() + "' , MobileNo_Rel='" + ddlMobileNo_Rel.Text + "'";
                    if (txtMobileNo1.Text.Trim() != "")
                    {
                        strSql += " , MobileNo1='" + txtMobileNo1.Text.Trim() + "' , MobileNo1_Rel='" + ddlMobileNo1_Rel.Text + "'";
                    }
                    if (txtLandlineNo.Text.Trim() != "")
                    {
                        strSql += " , LandlineNo='" + txtLandlineNo.Text.Trim() + "' , MobileNo2_Rel='" + ddlMobileNo2_Rel.Text + "'";
                    }
                    if (txtLandlineNo1.Text.Trim() != "")
                    {
                        strSql += " , LandlineNo1='" + txtLandlineNo1.Text.Trim() + "' , LandlineNo1_Rel='" + ddlLandlineNo1_Rel.Text + "'";
                    }

                    strSql += " WHERE MemberCode=" + lblMemberCode.Text;
                    int Res = objDb.ExecuteNonQuery(strSql);
                    if (Res > 0)
                    {
                        MessageBox.Show(txtProfileId.Text + " Contact Details Updated", "Mobile Number 4 validation", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        lblMemberCode.Text  = "";
                        txtLandlineNo.Text  = "";
                        txtLandlineNo1.Text = "";
                        txtMobileNo.Text    = "";
                        txtMobileNo1.Text   = "";
                        txtProfileId.Text   = "";
                        FillGrid();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
            }
        }