public virtual CloudAccountDA.FeatureMasterDataTable GetData()
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     CloudAccountDA.FeatureMasterDataTable dataTable = new CloudAccountDA.FeatureMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual int Fill(CloudAccountDA.FeatureMasterDataTable dataTable)
 {
     this.Adapter.SelectCommand = this.CommandCollection[0];
     if (this.ClearBeforeFill)
     {
         dataTable.Clear();
     }
     return(this.Adapter.Fill(dataTable));
 }
 public Stream ShowProfileImage(int conId)
 {
     this._objFeatureMasterDt = this._objFeatureMasterBll.GetDataByFeatureID(conId);
     try
     {
         return((Stream) new MemoryStream((byte[])this._objFeatureMasterDt.Rows[0]["FeatureImage"]));
     }
     catch
     {
         return((Stream)null);
     }
 }
Exemplo n.º 4
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.Page.IsValid)
         {
             if (this.txtFeatureName.Text.Trim().Length > 0)
             {
                 if (this.fuFeatureImage.HasFile)
                 {
                     int    contentLength = this.fuFeatureImage.PostedFile.ContentLength;
                     byte[] numArray      = new byte[contentLength];
                     this.fuFeatureImage.PostedFile.InputStream.Read(numArray, 0, contentLength);
                     if (this.objFeatureMasterBll.UpdateFeature(int.Parse(this.hfFeature.Value.Trim()), this.txtFeatureName.Text.Trim(), numArray, this.txtDesc.Text.Trim(), this.chkStatus.Checked, this.chkHome.Checked))
                     {
                         this.DisplayAlert("Update Successfully..");
                         this.Response.Redirect("~/BillTransact/FeatureMaster.aspx?cmd=view&ID=" + this.Request.QueryString["ID"]);
                     }
                     else
                     {
                         this.DisplayAlert("Fail to Update Details.");
                     }
                 }
                 else
                 {
                     this.objFeatureMasterDT = this.objFeatureMasterBll.GetDataByFeatureID(int.Parse(this.hfFeature.Value.Trim()));
                     if (this.objFeatureMasterBll.UpdateFeature(int.Parse(this.hfFeature.Value.Trim()), this.txtFeatureName.Text.Trim(), (byte[])this.objFeatureMasterDT.Rows[0]["FeatureImage"], this.txtDesc.Text.Trim(), this.chkStatus.Checked, this.chkHome.Checked))
                     {
                         this.DisplayAlert("Update Successfully..");
                         this.Response.Redirect("~/BillTransact/FeatureMaster.aspx?cmd=view&ID=" + this.Request.QueryString["ID"]);
                     }
                     else
                     {
                         this.DisplayAlert("Fail to Update Details.");
                     }
                 }
             }
             else
             {
                 this.DisplayAlert("Please Fill All Details...!");
             }
         }
         else
         {
             this.DisplayAlert("Fail to Update Details.");
         }
     }
     catch (Exception ex)
     {
         this.DisplayAlert(ex.Message);
     }
 }
Exemplo n.º 5
0
 protected void gvFeature_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType != DataControlRowType.DataRow)
     {
         return;
     }
     this.objFeatureMasterDT = this.objFeatureMasterBll.GetDataByFeatureID(int.Parse(e.Row.Cells[1].Text));
     if (this.objFeatureMasterDT.Rows.Count == 0)
     {
         return;
     }
     e.Row.Cells[1].Text = this.objFeatureMasterDT.Rows[0]["FeatureName"].ToString();
 }
Exemplo n.º 6
0
 private void SetRecord(string iD)
 {
     this.objFeatureMasterDT = this.objFeatureMasterBll.GetDataByFeatureID(int.Parse(iD));
     if (this.objFeatureMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfFeature.Value     = this.objFeatureMasterDT.Rows[0]["FeatureID"].ToString();
     this.txtFeatureName.Text = this.objFeatureMasterDT.Rows[0]["FeatureName"].ToString();
     this.txtDesc.Text        = this.objFeatureMasterDT.Rows[0]["FeatureDesc"].ToString();
     this.chkStatus.Checked   = this.objFeatureMasterDT.Rows[0]["FeatureStatus"].ToString() == "True";
     this.chkHome.Checked     = this.objFeatureMasterDT.Rows[0]["ShowOnHomePage"].ToString() == "True";
 }
Exemplo n.º 7
0
 private void ViewRecord(string i)
 {
     this.objFeatureMasterDT = this.objFeatureMasterBll.GetDataByFeatureID(int.Parse(i));
     if (this.objFeatureMasterDT.Rows.Count <= 0)
     {
         return;
     }
     this.hfFeature.Value          = this.objFeatureMasterDT.Rows[0]["FeatureID"].ToString();
     this.lblFeatureName.Text      = this.objFeatureMasterDT.Rows[0]["FeatureName"].ToString();
     this.lblDesc.Text             = this.objFeatureMasterDT.Rows[0]["FeatureDesc"].ToString();
     this.lblStatus.Text           = this.objFeatureMasterDT.Rows[0]["FeatureStatus"].ToString() == "True" ? "True" : "False";
     this.lblHome.Text             = this.objFeatureMasterDT.Rows[0]["ShowOnHomePage"].ToString() == "True" ? "True" : "False";
     this.imgFeatureImage.ImageUrl = "~/Handler/FeatureHandler.ashx?id=" + this.hfFeature.Value;
 }
 public virtual CloudAccountDA.FeatureMasterDataTable GetDataByFeatureID(int?FeatureID)
 {
     this.Adapter.SelectCommand = this.CommandCollection[1];
     if (FeatureID.HasValue)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = FeatureID.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     CloudAccountDA.FeatureMasterDataTable dataTable = new CloudAccountDA.FeatureMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
 public virtual CloudAccountDA.FeatureMasterDataTable GetDataByFeatureName(string FeatureName)
 {
     this.Adapter.SelectCommand = this.CommandCollection[2];
     if (FeatureName == null)
     {
         this.Adapter.SelectCommand.Parameters[1].Value = DBNull.Value;
     }
     else
     {
         this.Adapter.SelectCommand.Parameters[1].Value = FeatureName;
     }
     CloudAccountDA.FeatureMasterDataTable dataTable = new CloudAccountDA.FeatureMasterDataTable();
     this.Adapter.Fill(dataTable);
     return(dataTable);
 }
Exemplo n.º 10
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (!this.Page.IsValid)
     {
         return;
     }
     if (this.txtFeatureName.Text.Trim().Length > 0 && this.fuFeatureImage.HasFile)
     {
         this.objFeatureMasterDT = this.objFeatureMasterBll.GetDataByFeatureName(this.txtFeatureName.Text);
         if (this.objFeatureMasterDT.Rows.Count > 0)
         {
             this.DisplayAlert("Feature  Already Exist..");
             FeatureMaster.checkInDB = true;
         }
         else
         {
             FeatureMaster.checkInDB = false;
         }
         if (!FeatureMaster.checkInDB)
         {
             int    contentLength = this.fuFeatureImage.PostedFile.ContentLength;
             byte[] numArray      = new byte[contentLength];
             this.fuFeatureImage.PostedFile.InputStream.Read(numArray, 0, contentLength);
             int num = this.objFeatureMasterBll.AddFeature(this.txtFeatureName.Text.Trim(), numArray, this.txtDesc.Text.Trim(), this.chkStatus.Checked, this.chkHome.Checked);
             if (num != 0)
             {
                 this.DisplayAlert("Details Added Successfully.");
                 this.Response.Redirect("~/BillTransact/FeatureMaster.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...!");
     }
 }
 public virtual int Update(CloudAccountDA.FeatureMasterDataTable dataTable)
 {
     return(this.Adapter.Update(dataTable));
 }