Example #1
0
        public static void updateNextDealer(OnwayFlow onwayFlow)
        {
            Dictionary <string, string> dict = new Dictionary <string, string>();
            string conStr     = System.Configuration.ConfigurationManager.ConnectionStrings["ITSMModel"].ToString();
            long   billId     = onwayFlow.RepairAppyBillId;
            string NextDealer = onwayFlow.NextDealer;

            string sql = string.Format("update RepairApplyBills  set NextEmployee='{0}' where Id={1} ", NextDealer, billId);

            using (var context = new ITSMModel())
            {
                context.Database.ExecuteSqlCommand(sql);
            }
            //SqlHelper.ExecuteNonQuery(conStr, System.Data.CommandType.Text, sql);
        }
Example #2
0
        public static Dictionary <string, string> getHelpDesk()
        {
            Dictionary <string, string> dict = new Dictionary <string, string>();

            //string conStr = System.Configuration.ConfigurationManager.ConnectionStrings["ITSMModel"].ToString();

            using (var context = new ITSMModel())
            {
                var info = context.Database.SqlQuery <string>("select top 1 Dealer from FlowConfigs order by Level").ToList();

                if (info.Count > 0)
                {
                    string userName = info[0].ToString();
                    Dictionary <string, string> dict1 = new Dictionary <string, string>();
                    dict1 = getUserInfo(userName);

                    dict.Add("Dealer", userName);
                    dict.Add("EMail", dict1["EMail"]);
                    dict.Add("Mobile", dict1["Mobile"]);
                    dict.Add("DeptName", dict1["DeptName"]);
                }
            }
            return(dict);
        }