Beispiel #1
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode   = CommandMode.D;
     objClient = new Store.Client.BusinessObject.Client();
     oblClient = new Store.Client.BusinessLogic.Client();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objClient.ClientID          = Convert.ToInt32(dgvClient.DataKeys[gvrow.RowIndex].Value.ToString());
         objClient.ClientName        = "";
         objClient.ClientDisplayName = "";
         objClient.Address           = "";
         objClient.CityID            = 0;
         objClient.StateID           = 1;
         objClient.CountryID         = 2;
         objClient.PinID             = 3;
         objClient.CreatedBy         = 1;
         objMessageInfo = oblClient.ManageClientMaster(objClient, cmdMode);
         BindClient();
         updateClientBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
     }
     finally
     {
         objClient      = null;
         objMessageInfo = null;
         oblClient      = null;
     }
 }
Beispiel #2
0
 public Store.Common.MessageInfo ManageClientMaster(Store.Client.BusinessObject.Client objClient, CommandMode cmdMode)
 {
     try
     {
         return(odlClient.ManageClient(objClient, cmdMode));
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
         return(null);
     }
 }
Beispiel #3
0
        public Store.Common.MessageInfo ManageClient(Store.Client.BusinessObject.Client objClient, CommandMode cmdMode)
        {
            string          SQL       = "";
            ParameterList   paramList = new ParameterList();
            DataTableReader dr;

            Store.Common.MessageInfo objMessageInfo = null;
            try
            {
                SQL = "USP_ManageClient";
                paramList.Add(new SQLParameter("@ClientID", objClient.ClientID));
                paramList.Add(new SQLParameter("@ClientName", objClient.ClientName));
                paramList.Add(new SQLParameter("@ClientDisplayName", objClient.ClientDisplayName));
                paramList.Add(new SQLParameter("@Address", objClient.Address));
                paramList.Add(new SQLParameter("@CityID", objClient.CityID));
                paramList.Add(new SQLParameter("@StateID", objClient.StateID));
                paramList.Add(new SQLParameter("@CountryID", objClient.CountryID));
                paramList.Add(new SQLParameter("@PinID", objClient.PinID));
                if (cmdMode == CommandMode.N)
                {
                    paramList.Add(new SQLParameter("@UserId", objClient.CreatedBy));
                }
                else
                {
                    paramList.Add(new SQLParameter("@UserId", objClient.ModifiedBy));
                }
                paramList.Add(new SQLParameter("@ReferenceID", objClient.ReferenceID));
                paramList.Add(new SQLParameter("@IsActive", objClient.IsActive));
                paramList.Add(new SQLParameter("@CMDMode", cmdMode));
                dr = ExecuteQuery.ExecuteReader(SQL, paramList);
                if (dr.Read())
                {
                    objMessageInfo = new Store.Common.MessageInfo();
                    //objMessageInfo = new Pareeksha.Common.MessageInfo();
                    objMessageInfo.ErrorCode    = Convert.ToInt32(dr["ErrorCode"]);
                    objMessageInfo.ErrorMessage = Convert.ToString(dr["ErrorMessage"]);
                    objMessageInfo.TranID       = Convert.ToInt32(dr["TranID"]);
                    objMessageInfo.TranCode     = Convert.ToString(dr["TranCode"]);
                    objMessageInfo.TranMessage  = Convert.ToString(dr["TranMessage"]);
                }
            }
            catch (Exception ex)
            {
                Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
            }
            return(objMessageInfo);
        }
Beispiel #4
0
        void ManageClientCategory()
        {
            objClient = new Store.Client.BusinessObject.Client();
            oblClient = new Store.Client.BusinessLogic.Client();

            try
            {
                if (cmdMode == Store.Common.CommandMode.M)

                {
                    objClient.ClientID = Convert.ToInt32(txtClientId.Text);
                    //objClient.ModifiedBy = Convert.ToInt32(Session["UserId"].ToString());
                }
                else
                {
                    objClient.ClientID = 0;
                    //objClient.CreatedBy = Convert.ToInt32(Session["UserId"].ToString());
                }
                objClient.ClientName        = Convert.ToString(txtClientName.Text);
                objClient.ClientDisplayName = Convert.ToString(txtClientDisplayName.Text);
                objClient.Address           = Convert.ToString(txtAddress.Text);
                objClient.CityID            = Convert.ToInt32(ddlCity.SelectedItem.Value);
                objClient.StateID           = Convert.ToInt32(ddlState.SelectedItem.Value);
                objClient.CountryID         = Convert.ToInt32(ddlCountry.SelectedItem.Value);
                objClient.PinID             = Convert.ToInt32(txtPinId.Text);
                if (cbIsActive.Checked)
                {
                    objClient.IsActive = 1;
                }
                else
                {
                    objClient.IsActive = 0;
                }
                objMessageInfo = oblClient.ManageClientMaster(objClient, cmdMode);
            }
            catch (Exception ex)
            {
                Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
            }
            finally
            {
                objClient = null;
                //objMessageInfo = null;
                oblClient = null;
            }
        }
Beispiel #5
0
 void getDetail(int id)
 {
     try
     {
         objClient    = new Store.Client.BusinessObject.Client();
         oblClient    = new Store.Client.BusinessLogic.Client();
         objClient    = oblClient.GetAllClient(id, 1, "1");
         lblName.Text = objClient.ClientDisplayName;
     }
     catch
     {
     }
     finally
     {
         objClient = null;
         oblClient = null;
     }
 }
Beispiel #6
0
        public Store.Client.BusinessObject.Client GetAllClient(int ClientID, int Flag, string FlagValue)
        {
            Store.Client.BusinessObject.Client objClient = null;
            string          SQL       = string.Empty;
            ParameterList   paramList = new ParameterList();
            DataTableReader dr;

            try
            {
                SQL = "proc_Client";
                paramList.Add(new SQLParameter("@ClientID", ClientID));
                paramList.Add(new SQLParameter("@Flag", Flag));
                paramList.Add(new SQLParameter("@FlagValue", FlagValue));
                dr = ExecuteQuery.ExecuteReader(SQL, paramList);
                while (dr.Read())
                {
                    objClient = new BusinessObject.Client();
                    if (dr.IsDBNull(dr.GetOrdinal("ClientID")) == false)
                    {
                        objClient.ClientID = dr.GetInt32(dr.GetOrdinal("ClientID"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("ClientName")) == false)
                    {
                        objClient.ClientName = dr.GetString(dr.GetOrdinal("ClientName"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("ClientDisplayName")) == false)
                    {
                        objClient.ClientDisplayName = dr.GetString(dr.GetOrdinal("ClientDisplayName"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("Address")) == false)
                    {
                        objClient.Address = dr.GetString(dr.GetOrdinal("Address"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("CityID")) == false)
                    {
                        objClient.CityID = dr.GetInt32(dr.GetOrdinal("CityID"));
                    }

                    if (dr.IsDBNull(dr.GetOrdinal("CityName")) == false)
                    {
                        objClient.CityName = dr.GetString(dr.GetOrdinal("CityName"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("StateID")) == false)
                    {
                        objClient.StateID = dr.GetInt32(dr.GetOrdinal("StateID"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("StateName")) == false)
                    {
                        objClient.StateName = dr.GetString(dr.GetOrdinal("StateName"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("CountryID")) == false)
                    {
                        objClient.CountryID = dr.GetInt32(dr.GetOrdinal("CountryID"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("CountryName")) == false)
                    {
                        objClient.CountryName = dr.GetString(dr.GetOrdinal("CountryName"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("PinID")) == false)
                    {
                        objClient.PinID = dr.GetInt32(dr.GetOrdinal("PinID"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("CreatedBy")) == false)
                    {
                        objClient.CreatedBy = dr.GetInt32(dr.GetOrdinal("CreatedBy"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("CreatedOn")) == false)
                    {
                        objClient.CreatedOn = dr.GetDateTime(dr.GetOrdinal("CreatedOn"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("ModifiedBy")) == false)
                    {
                        objClient.ModifiedBy = dr.GetInt32(dr.GetOrdinal("ModifiedBy"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("ModifiedOn")) == false)
                    {
                        objClient.ModifiedOn = dr.GetDateTime(dr.GetOrdinal("ModifiedOn"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("ReferenceID")) == false)
                    {
                        objClient.ReferenceID = dr.GetInt32(dr.GetOrdinal("ReferenceID"));
                    }
                    if (dr.IsDBNull(dr.GetOrdinal("IsActive")) == false)
                    {
                        objClient.IsActive = dr.GetInt32(dr.GetOrdinal("IsActive"));
                    }
                }
                dr.Close();
            }
            catch (Exception ex)
            {
                Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Client).FullName, 1);
            }
            return(objClient);
        }