public virtual CloudAccountDA.FrequencyMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.FrequencyMasterDataTable dataTable = new CloudAccountDA.FrequencyMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual int Fill(CloudAccountDA.FrequencyMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
Ejemplo n.º 3
0
 private void SetRecord(string iD)
 {
     this.objFrequencyMasterDT = this.objFrequencyMasterBll.GetDataByFrequencyID(int.Parse(iD));
     if (this.objFrequencyMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfFrequency.Value = this.objFrequencyMasterDT.Rows[0]["FrequencyID"].ToString();
     this.txtName.Text      = this.objFrequencyMasterDT.Rows[0]["FrequencyName"].ToString();
     this.txtNoOfDays.Text  = this.objFrequencyMasterDT.Rows[0]["NoOfDays"].ToString();
     this.txtDesc.Text      = this.objFrequencyMasterDT.Rows[0]["FrequencyDesc"].ToString();
     this.chkStatus.Checked = this.objFrequencyMasterDT.Rows[0]["FrequencyStatus"].ToString() == "True";
 }
Ejemplo n.º 4
0
 private void ViewRecord(string i)
 {
     this.objFrequencyMasterDT = this.objFrequencyMasterBll.GetDataByFrequencyID(int.Parse(i));
     if (this.objFrequencyMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfFrequency.Value = this.objFrequencyMasterDT.Rows[0]["FrequencyID"].ToString();
     this.lblName.Text      = this.objFrequencyMasterDT.Rows[0]["FrequencyName"].ToString();
     this.lblNoOfDays.Text  = this.objFrequencyMasterDT.Rows[0]["NoOfDays"].ToString();
     this.lblDesc.Text      = this.objFrequencyMasterDT.Rows[0]["FrequencyDesc"].ToString();
     this.lblStatus.Text    = this.objFrequencyMasterDT.Rows[0]["FrequencyStatus"].ToString() == "True" ? "True" : "False";
 }
 public virtual CloudAccountDA.FrequencyMasterDataTable GetDataByFrequencyID(int?FrequencyID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     if (FrequencyID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = FrequencyID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.FrequencyMasterDataTable dataTable = new CloudAccountDA.FrequencyMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual CloudAccountDA.FrequencyMasterDataTable GetDataByFrequencyName(string FrequencyName)
 {
     this.Adapter.SelectCommand = this.CommandCollection[2];
     if (FrequencyName == null)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = FrequencyName;
     }
     CloudAccountDA.FrequencyMasterDataTable dataTable = new CloudAccountDA.FrequencyMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Ejemplo n.º 7
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!this.Page.IsValid)
     {
         return;
     }
     if (this.txtName.Text.Trim().Length > 0 && this.txtNoOfDays.Text.Trim().Length > 0)
     {
         this.objFrequencyMasterDT = this.objFrequencyMasterBll.GetDataByFrequencyName(this.txtName.Text);
         if (this.objFrequencyMasterDT.Rows.Count > 0)
         {
             this.DisplayAlert("Frequency Already Exist..");
             this.checkInDB = true;
         }
         else
         {
             this.checkInDB = false;
         }
         if (!this.checkInDB)
         {
             int num = this.objFrequencyMasterBll.AddFrequency(this.txtName.Text.Trim(), int.Parse(this.txtNoOfDays.Text.Trim()), this.txtDesc.Text.Trim(), this.chkStatus.Checked);
             if (num != 0)
             {
                 this.DisplayAlert("Details Added Successfully.");
                 this.Response.Redirect("~/BillTransact/FrequencyMaster.aspx?cmd=view&ID=" + (object)num);
             }
             else
             {
                 this.DisplayAlert("Fail to Add New Details.");
                 this.Clear();
             }
         }
         else
         {
             this.DisplayAlert("Fail to Add New Details.");
             this.Clear();
         }
     }
     else
     {
         this.DisplayAlert("Please Fill All Details...!");
     }
 }
Ejemplo n.º 8
0
        private void CallAllRecurringInvoice()
        {
            this.objRecurringMasterDT = this.objRecurringMasterBll.GetAllActiveTodayRecurring();
            if (this.objRecurringMasterDT.Rows.Count <= 0)
            {
                return;
            }
            for (int index = 0; index < this.objRecurringMasterDT.Rows.Count; ++index)
            {
                int      iRecurringID     = int.Parse(this.objRecurringMasterDT.Rows[index]["RecurringID"].ToString());
                int      num1             = int.Parse(this.objRecurringMasterDT.Rows[index]["CompanyID"].ToString());
                int      num2             = int.Parse(this.objRecurringMasterDT.Rows[index]["ClientID"].ToString());
                int      iFrequencyID     = int.Parse(this.objRecurringMasterDT.Rows[index]["HowOften"].ToString());
                DateTime dtNextDate       = DateTime.Parse(this.objRecurringMasterDT.Rows[index]["NextDate"].ToString());
                string   str1             = this.objRecurringMasterDT.Rows[index]["RemainingInvoice"].ToString();
                bool     bRecurringActive = true;
                string   s;
                try
                {
                    s = int.Parse(str1.Trim()).ToString();
                }
                catch (Exception ex)
                {
                    s = "-1";
                }
                this.objFrequencyMasterDT = this.objFrequencyMasterBll.GetDataByFrequencyID(iFrequencyID);
                if (this.objFrequencyMasterDT.Rows.Count > 0)
                {
                    int num3 = int.Parse(this.objFrequencyMasterDT.Rows[0]["NoOfDays"].ToString());
                    dtNextDate = dtNextDate.AddDays((double)num3);
                }
                string sRemainingInvoice;
                switch (s)
                {
                case "-1":
                    sRemainingInvoice = "infinite";
                    break;

                default:
                    sRemainingInvoice = (int.Parse(s) - 1).ToString();
                    if (sRemainingInvoice == "0")
                    {
                        bRecurringActive = false;
                        break;
                    }
                    break;
                }
                this.objRecurringMasterBll.UpdateForSentInvoice(iRecurringID, sRemainingInvoice, dtNextDate, bRecurringActive);
                this.objInvoiceMasterDT = this.objInvoiceMasterBll.GetDataByCompanyID(num1);
                string str2 = this.objInvoiceMasterDT.Rows.Count <= 0 ? ConfigurationManager.AppSettings["InvoiceNoStart"] : InvoiceMaster.NextNum(this.objInvoiceMasterDT.Rows[this.objInvoiceMasterDT.Rows.Count - 1]["InvoiceNumber"].ToString());
                int    num4 = this.objInvoiceMasterBll.AddInvoice(str2, iRecurringID);
                this.objRecurringItemDetailDT = this.objRecurringItemDetailBll.GetDataByRecurringID(iRecurringID);
                if (this.objRecurringItemDetailDT.Rows.Count > 0)
                {
                    this.objInvoiceItemDetailBll.AddInvoiceItem(num4, iRecurringID);
                }
                this.objRecurringTaskDetailDT = this.objRecurringTaskDetailBll.GetDataByRecurringID(iRecurringID);
                if (this.objRecurringTaskDetailDT.Rows.Count > 0)
                {
                    this.objInvoiceTaskDetailBll.AddInvoiceTask(num4, iRecurringID);
                }
                this.objCompanyClientMasterDT = this.objCompanyClientMasterBll.GetDataByCompanyClientID(num2);
                if (this.objCompanyClientMasterDT.Rows.Count > 0)
                {
                    this.SendMail(this.objCompanyClientMasterDT.Rows[0]["Email"].ToString(), str2, num4, num2, num1);
                }
            }
        }
 public virtual int Update(CloudAccountDA.FrequencyMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }