private void ViewRecord(string i)
 {
     this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(i));
     if (this.objCloudPackageMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfPackage.Value       = this.objCloudPackageMasterDT.Rows[0]["CloudPackageID"].ToString();
     this.lblName.Text          = this.objCloudPackageMasterDT.Rows[0]["CloudPackageName"].ToString();
     this.lblPricePerMonth.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"].ToString();
     this.lblPricePerYear.Text  = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"].ToString();
     this.lblDescription.Text   = this.objCloudPackageMasterDT.Rows[0]["CloudPackageDescription"].ToString();
     this.lblStatus.Text        = this.objCloudPackageMasterDT.Rows[0]["CloudPackageStatus"].ToString() == "True" ? "True" : "False";
     this.lblMonthCurrency.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackageCurrency"].ToString();
     this.objCurrencyMasterDT   = this.objCurrencyMasterBll.GetDataByCurrencyID(int.Parse(this.lblMonthCurrency.Text));
     this.lblMonthCurrency.Text = this.objCurrencyMasterDT.Rows[0]["CurrencyName"].ToString();
     if (Convert.ToString(this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"]) == "")
     {
         if (this.lblPricePerMonth.Text == "")
         {
             this.lblPricePerMonth.Text = "0.0";
         }
         this.lblPricePerMonth.Text = "0" + (object)" " + (string)(object)Decimal.Round(Decimal.Parse(this.lblPricePerMonth.Text), 2);
     }
     else
     {
         if (this.lblPricePerMonth.Text == "")
         {
             this.lblPricePerMonth.Text = "0.0";
         }
         this.lblPricePerMonth.Text = (string)this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"] + (object)" " + Convert.ToString(Decimal.Round(Decimal.Parse(this.lblPricePerMonth.Text), 2));
     }
 }
 public virtual CloudAccountDA.CloudPackageMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.CloudPackageMasterDataTable dataTable = new CloudAccountDA.CloudPackageMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Esempio n. 3
0
 protected string GetPackageName(string pId)
 {
     this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(pId));
     if (this.objCloudPackageMasterDT.Rows.Count > 0)
     {
         return(this.objCloudPackageMasterDT.Rows[0]["CloudPackageName"].ToString());
     }
     return("FREE");
 }
 public virtual int Fill(CloudAccountDA.CloudPackageMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
Esempio n. 5
0
 protected void gvCompanyPackage_OnRowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType != DataControlRowType.DataRow)
     {
         return;
     }
     this.objCompanyMasterDT      = this.objCompanyMasterBll.GetDataByCompanyID(int.Parse(e.Row.Cells[1].Text));
     e.Row.Cells[1].Text          = this.objCompanyMasterDT.Rows[0]["CompanyName"].ToString();
     this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(e.Row.Cells[2].Text));
     e.Row.Cells[2].Text          = this.objCloudPackageMasterDT.Rows.Count > 0 ? this.objCloudPackageMasterDT.Rows[0]["CloudPackageName"].ToString() : "FREE";
 }
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!this.Page.IsValid)
     {
         return;
     }
     if (this.txtName.Text.Trim().Length > 0)
     {
         this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageName(this.txtName.Text);
         if (this.objCloudPackageMasterDT.Rows.Count > 0)
         {
             this.DisplayAlert("Package Already Exist..");
             this.checkInDB = true;
         }
         else
         {
             this.checkInDB = false;
         }
         if (!this.checkInDB)
         {
             int iCloudPackageID = this.objCloudPackageMasterBll.AddCloudPackage("", this.txtName.Text.Trim(), new Decimal?(Decimal.Parse(this.txtPricePerMonth.Text.Trim())), new Decimal?(Decimal.Parse(this.txtPricePerYear.Text.Trim())), int.Parse(this.ddlMonthCurrency.SelectedItem.Value), this.txtDescription.Text.Trim(), this.chkStatus.Checked);
             if (iCloudPackageID != 0)
             {
                 if (this.gvAddModule.Rows.Count > 0)
                 {
                     for (int index = 0; index < this.gvAddModule.Rows.Count; ++index)
                     {
                         Label  label1 = (Label)this.gvAddModule.Rows[index].FindControl("lblPackageFeatureID");
                         Label  label2 = (Label)this.gvAddModule.Rows[index].FindControl("lblPackageModuleID");
                         string sCloudPackageDetailValue = !(((ListControl)this.gvAddModule.Rows[index].FindControl("rblInput")).SelectedItem.Value == "1") ? ((CheckBox)this.gvAddModule.Rows[index].FindControl("chkValue")).Checked.ToString() : ((TextBox)this.gvAddModule.Rows[index].FindControl("txtValue")).Text.Trim();
                         this.objCloudPackageDetailsBll.AddCloudPackageDetails(iCloudPackageID, int.Parse(label2.Text), int.Parse(label1.Text), sCloudPackageDetailValue);
                     }
                 }
                 this.DisplayAlert("Details Added Successfully.");
                 this.Response.Redirect("~/BillTransact/CloudPackageMaster.aspx?cmd=view&ID=" + (object)iCloudPackageID);
             }
             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...!");
     }
 }
Esempio n. 7
0
 protected void ddlPackage_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.ddlPackage.SelectedIndex <= 0)
     {
         return;
     }
     this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(this.ddlPackage.SelectedItem.Value));
     if (this.objCloudPackageMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.lblPriceMonth.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"].ToString();
     this.lblPriceYear.Text  = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"].ToString();
 }
 public virtual CloudAccountDA.CloudPackageMasterDataTable GetDataByCloudPackageID(int?CloudPackageID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     if (CloudPackageID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = CloudPackageID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.CloudPackageMasterDataTable dataTable = new CloudAccountDA.CloudPackageMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual CloudAccountDA.CloudPackageMasterDataTable GetDataByCloudPackageName(string CloudPackageName)
 {
     this.Adapter.SelectCommand = this.CommandCollection[2];
     if (CloudPackageName == null)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = CloudPackageName;
     }
     CloudAccountDA.CloudPackageMasterDataTable dataTable = new CloudAccountDA.CloudPackageMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Esempio n. 10
0
        protected void btnClick_Click(object sender, EventArgs e)
        {
            this.lblError.Text = "";
            Button button = (Button)sender;

            this.hfPackageID.Value    = button.CommandArgument;
            this.lblPackageName1.Text = this.lblPackageName.Text = button.ToolTip;
            if (string.IsNullOrEmpty(this.hfPackageID.Value))
            {
                return;
            }
            this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(this.hfPackageID.Value));
            if (this.objCloudPackageMasterDT.Rows.Count <= 0)
            {
                return;
            }
            this.lblPriceMonth1.Text = this.lblPriceMonth.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"].ToString();
            this.lblPriceYear1.Text  = this.lblPriceYear.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"].ToString();
        }
 private void SetRecord(string iD)
 {
     this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(iD));
     if (this.objCloudPackageMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfPackage.Value       = this.objCloudPackageMasterDT.Rows[0]["CloudPackageID"].ToString();
     this.txtName.Text          = this.objCloudPackageMasterDT.Rows[0]["CloudPackageName"].ToString();
     this.txtPricePerMonth.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"].ToString();
     this.txtPricePerYear.Text  = this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"].ToString();
     this.txtDescription.Text   = this.objCloudPackageMasterDT.Rows[0]["CloudPackageDescription"].ToString();
     this.chkStatus.Checked     = this.objCloudPackageMasterDT.Rows[0]["CloudPackageStatus"].ToString() == "True";
     this.objCurrencyMasterDT   = this.objCurrencyMasterBll.GetDataByCurrencyID(int.Parse(this.objCloudPackageMasterDT.Rows[0]["CloudPackageCurrency"].ToString()));
     if (this.objCurrencyMasterDT.Rows.Count > 0)
     {
         this.ddlMonthCurrency.Items.Add(this.objCurrencyMasterDT.Rows[0]["CurrencyID"].ToString());
         this.ddlMonthCurrency.SelectedValue = this.objCurrencyMasterDT.Rows[0]["CurrencyID"].ToString();
     }
     this.objCloudPackageDetailsDT = this.objCloudPackageDetailsBll.GetDataByCloudPackageID(int.Parse(this.hfPackage.Value));
     for (int index = 0; index < this.objCloudPackageDetailsDT.Rows.Count; ++index)
     {
         RadioButtonList radioButtonList = (RadioButtonList)this.gvAddModule.Rows[index].FindControl("rblInput");
         string          str             = this.objCloudPackageDetailsDT.Rows[index]["CloudPackageDetailValue"].ToString();
         if (str == "True" || str == "False")
         {
             radioButtonList.SelectedValue = "2";
             this.rblInput_SelectedIndexChanged((object)radioButtonList, (EventArgs)null);
             CheckBox checkBox = (CheckBox)this.gvAddModule.Rows[index].FindControl("chkValue");
             checkBox.Visible = true;
             checkBox.Checked = bool.Parse(str);
         }
         else
         {
             radioButtonList.SelectedValue = "1";
             this.rblInput_SelectedIndexChanged((object)radioButtonList, (EventArgs)null);
             TextBox textBox = (TextBox)this.gvAddModule.Rows[index].FindControl("txtValue");
             textBox.Visible = true;
             textBox.Text    = str;
         }
     }
 }
Esempio n. 12
0
        protected void rpPackage_OnItemCommand(object source, RepeaterCommandEventArgs e)
        {
            if (!(e.CommandName == "openPopup"))
            {
                return;
            }
            ModalPopupExtender modalPopupExtender = (ModalPopupExtender)e.Item.FindControl("mpPackage");
            Button             button             = (Button)e.Item.FindControl("btnClick");

            this.lblError.Text        = "";
            this.hfPackageID.Value    = button.CommandArgument;
            this.lblPackageName1.Text = this.lblPackageName.Text = button.ToolTip;
            if (!string.IsNullOrEmpty(this.hfPackageID.Value))
            {
                this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(this.hfPackageID.Value));
                if (this.objCloudPackageMasterDT.Rows.Count > 0)
                {
                    this.objCurrencyMasterDT = this.objCurrencyMasterBll.GetDataByCurrencyID(int.Parse(this.objCloudPackageMasterDT.Rows[0]["CloudPackageCurrency"].ToString()));
                    this.lblPriceMonth1.Text = this.lblPriceMonth.Text = (string)this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"] + (object)" " + (string)this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceMonthly"];
                    this.lblPriceYear1.Text  = this.lblPriceYear.Text = (string)this.objCurrencyMasterDT.Rows[0]["CurrencySymbol"] + (object)" " + (string)this.objCloudPackageMasterDT.Rows[0]["CloudPackagePriceYearly"];
                }
            }
            modalPopupExtender.Show();
        }
Esempio n. 13
0
        private void SetCompanyLogo()
        {
            MembershipUser user = Membership.GetUser();

            if (user != null)
            {
                string str1 = user.ToString();
                if (Roles.IsUserInRole(str1, "Admin"))
                {
                    this.objCompanyLoginMasterDT = this.objCompanyLoginMasterBll.GetDataByCompanyLoginName(str1);
                    if (this.objCompanyLoginMasterDT.Rows.Count > 0)
                    {
                        string str2 = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                        this.hfCompanyID.Value = this.objCompanyLoginMasterDT.Rows[0]["CompanyID"].ToString();
                        this.imgLogo.ImageUrl  = "../Handler/CompanyLogoFile.ashx?id=" + str2;
                    }
                }
                else if (Roles.IsUserInRole(str1, "Employee"))
                {
                    this.objStaffMasterDT = this.objStaffMasterBll.GetDataByStaffUserName(str1);
                    if (this.objStaffMasterDT.Rows.Count > 0)
                    {
                        string str2 = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                        this.hfCompanyID.Value = this.objStaffMasterDT.Rows[0]["CompanyID"].ToString();
                        this.imgLogo.ImageUrl  = "../Handler/CompanyLogoFile.ashx?id=" + str2;
                    }
                }
                else
                {
                    this.imgLogo.ImageUrl = "../App_Themes/sky/uploads/logo.png";
                }
                if (this.hfCompanyID.Value.ToString() != "")
                {
                    this.objCompanyPackageMasterDT = this.objCompanyPackageMasterBll.GetDataByCompanyActivePackage(int.Parse(this.hfCompanyID.Value));
                }
                if (this.objCompanyPackageMasterDT.Rows.Count <= 0)
                {
                    return;
                }
                string s = this.objCompanyPackageMasterDT.Rows[0]["CloudPackageID"].ToString();
                if (s == "0")
                {
                    this.lblPackageName.Text = "Free Trial";
                }
                else
                {
                    this.objCloudPackageMasterDT = this.objCloudPackageMasterBll.GetDataByCloudPackageID(int.Parse(s));
                    if (this.objCloudPackageMasterDT.Rows.Count > 0)
                    {
                        this.lblPackageName.Text = this.objCloudPackageMasterDT.Rows[0]["CloudPackageName"].ToString() + " Package";
                    }
                }
                TimeSpan timeSpan = DateTime.Parse(DateTime.Parse(this.objCompanyPackageMasterDT.Rows[0]["PackageEndDate"].ToString()).ToShortDateString()) - DateTime.Parse(DateTime.UtcNow.ToShortDateString());
                if (timeSpan.TotalDays <= 0.0)
                {
                    this.Response.Redirect("UpgradePackage.aspx");
                }
                else
                {
                    this.lblDays.Text = timeSpan.TotalDays.ToString((IFormatProvider)CultureInfo.InvariantCulture);
                }
            }
            else
            {
                this.imgLogo.ImageUrl = "../App_Themes/sky/uploads/logo.png";
                this.LoginStatus1_OnLoggingOut((object)null, (LoginCancelEventArgs)null);
            }
        }
 public virtual int Update(CloudAccountDA.CloudPackageMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }