public DataTable InsertUserDetails(UserDetails userInfo)
        {
            EncDcr    enc       = new EncDcr();
            DataTable dataTable = SqlHelper.ExecuteDataset(dbConnect.getConstr(), "SP_USERMGMT", userInfo.TransType, userInfo.Code, userInfo.Shopid, userInfo.UserName, userInfo.Password, userInfo.Empno, userInfo.Fullname, userInfo.UserCategory, userInfo.LocoCategory, userInfo.WorkFlowList, userInfo.IsDeactive, userInfo.User, enc.GetIPAddress(), enc.GetHostName()).Tables[0];

            return(dataTable);
        }
示例#2
0
        public static SqlConnection getCn()
        {
            EncDcr enc = new EncDcr();
            //SqlConnection cn = enc.Connection("Sqlplesk4.securehostdns.com,1533", "dlwlocodb", "dlwloco", "A1b2c3d4e5-*/");
            SqlConnection cn = enc.Connection("AJAY\\SQLEXPRESS2008", "DLWLOCODB", "admin", "");

            cn.Open();
            return(cn);
        }
示例#3
0
        private void Fn_CreateLoco(string LocoNo, string AcSystems)
        {
            EncDcr enc = new EncDcr();

            ds = SqlHelper.ExecuteDataset(dbConnect.getConstr(), "sp_LocoMaster", "I", txtLasInDate.Text, int.Parse(ddlFromShop.SelectedValue), int.Parse(ddlToShop.SelectedValue), int.Parse(ddlLocoCategory.SelectedValue), int.Parse(ddlLocoType.SelectedValue), txtDLWSrno.Value, int.Parse(ddlEngineType.SelectedValue), LocoNo, txtHP.Value, AcSystems, 0, 0, 0, 0, "Admin", enc.GetIPAddress(), enc.GetHostName());
            if (ds.Tables[0].Rows.Count > 0)
            {
                Label1.Text = ds.Tables[0].Rows[0][1].ToString();
            }
        }
示例#4
0
        private void Fn_ShopMaster(string transtype, string shopname, string shopno, string ShortName, int code, int isdeactive)
        {
            EncDcr enc = new EncDcr();

            ds = SqlHelper.ExecuteDataset(dbConnect.getConstr(), "sp_ShopMaster", transtype, shopname, shopno, ShortName, code, isdeactive, "Admin", enc.GetIPAddress(), enc.GetHostName());
            if (ds.Tables[0].Rows.Count > 0)
            {
                txtalert.Text = ds.Tables[0].Rows[0][1].ToString();
                if (ds.Tables[0].Rows[0][0].ToString() == "1")
                {
                    txtalert.CssClass = "alert alert-success pull-right";
                }
                else
                {
                    txtalert.CssClass = "alert alert-danger pull-right";
                }
            }
        }
 private void Fn_WorkFlowMaster(string transtype, int code, int Srno, int ShopID, string head, int priority, int lococatgory, int IsDeactive)
 {
     try
     {
         EncDcr enc = new EncDcr();
         ds = SqlHelper.ExecuteDataset(dbConnect.getConstr(), "sp_WorkFlowMaster", transtype, code, Srno, ShopID, lococatgory, head, priority, IsDeactive, "Admin", enc.GetIPAddress(), enc.GetHostName());
         if (ds.Tables[0].Rows.Count > 0)
         {
             txtalert.Text = ds.Tables[0].Rows[0][1].ToString();
             if (ds.Tables[0].Rows[0][0].ToString() == "1")
             {
                 txtalert.CssClass = "alert alert-success pull-right";
             }
             else
             {
                 txtalert.CssClass = "alert alert-danger pull-right";
             }
         }
     }
     catch (Exception ex)
     {
     }
 }
 private void Fn_PermissionMaster(string transtype, int code, string Modulename, string Category, int isdeactive)
 {
     try
     {
         EncDcr enc = new EncDcr();
         ds = SqlHelper.ExecuteDataset(dbConnect.getConstr(), "sp_PermissionMaster", transtype, code, Modulename, Category, isdeactive, "Admin", enc.GetIPAddress(), enc.GetHostName());
         if (ds.Tables[0].Rows.Count > 0)
         {
             txtalert.Text = ds.Tables[0].Rows[0][1].ToString();
             if (ds.Tables[0].Rows[0][0].ToString() == "1")
             {
                 txtalert.CssClass = "alert alert-success pull-right";
             }
             else
             {
                 txtalert.CssClass = "alert alert-danger pull-right";
             }
         }
     }
     catch (Exception ex)
     {
         txtalert.Text = ex.Message;
     }
 }
示例#7
0
        public static String Decrypt(string String)
        {
            EncDcr encr = new EncDcr();

            return(encr.Decrypt(String));
        }