Thursday, December 22, 2016

Transparent a menu by CSS

.header-top{

background: rgba(27, 70, 107, 0.4);    //depends on 'a' value here that is 0.4
border-top: 5px solid#000;
height:6.5em;
}





Saturday, August 20, 2016

DateTime conversion

string xx = Convert.ToString(item.JOBCDT);
                    DateTime jobcdt = DateTime.Parse(xx);
                    string JobCDT = jobcdt.ToString("dd-MMM-yyyy");





Visit my youtube channel and see how to use for loop at C Programming

Saturday, July 16, 2016

UTF-8

UTF : Unicode Transformation Format.


The Unicode Consortium develops the Unicode Standard. Their goal is to replace the existing character sets with its standard Unicode Transformation Format (UTF).
The Unicode Standard has become a success and is implemented in HTML, XML, Java, JavaScript, E-mail, ASP, PHP, etc. The Unicode standard is also supported in many operating systems and all modern browsers.
The Unicode Consortium cooperates with the leading standards development organizations, like ISO, W3C, and ECMA.

UTF-8: A Character in UTF-8 can be from 1 to 4 bytes long. UTF-8 can represnt any character in the Unicode standard. UTF-8 is backwards compitable with ASCII. UTF-8 is the preferred encoding for e-mail and web pages.



Visit my Youtube channel and see how you could get a string and display that string by C Programming. 

Sunday, July 10, 2016

Convert number to String in Javascript

   $('#OTPTP').change(function () {
                var compid = $('#txtcompid').val();
                var type = $('#OTPTP').val();
                var Otpid = compid.toString() + "301010100001";     //This one.......
                if(type=="OTCHARGE")
                {
                    $('#OTPName').val("INCOME FROM INDOOR");
                    $('#OTPID').val(Otpid);
                }
                else
                {
                    $('#OTPName').val("");
                    $('#OTPID').val("");
                }
           


            });

Visit my youtube channel. Hopefully you will like this.


Thursday, June 30, 2016

Surah Al-Baqarah

"O mankind, worship your Lord, who created you and those before you, that you may become righteous"
Surah Al-Baqarah [2:21]




"[He] who made for you the earth a bed [spread out] and the sky a ceiling and sent down from the sky, rain and brought forth thereby fruits as provision for you. So do not attribute to Allah equals while you know [that there is nothing similar to Him]"
Surah Al-Baqarah [2:22]





"How can you disbelieve in Allah when you were lifeless and He brought you to life; then He will cause you to die, then He will bring you [back] to life, and then to Him you will be returned"
Surah Al-Baqarah [2:28]



"And do not mix the truth with falsehood or conceal the truth while you know [it]"
Surah Al-Baqarah [2:42]



"And establish prayer and give zakah and bow with those who bow [in worship and obedience]"
Surah Al-Baqarah [2:43]



"O Children of Israel, remember My favor that I have bestowed upon you and that I preferred you over the worlds"
Surah Al-Baqarah [2:47]





"And fear a Day when no soul will suffice(চলা) for another soul at all, nor will intercession(মধ্যস্থতা) be accepted from it, nor will compensation(ক্ষতিপূরণ) be taken from it, nor will they be aided(সাহায্য)"
Surah Al-Baqarah [2:48]




Visit my youtube channel.

Monday, June 27, 2016

Total Sum by Angular JS

In the index.cshtml file: 

 <tr>
                        <td></td>
                        <td ><b>Total:</b> </td>
                        <td><p id="gridTotalamount">{{GetSummOfAmount(PConsultData)}}</p></td>
                        <td></td>
 </tr>

In the Js File(PatientConsult.js):

 $scope.GetSummOfAmount = function (PConsultData) {
        var summ = 0;
     
        for (var i in PConsultData) {
            summ = summ + Number(PConsultData[i].Amount);
        } 
   


        return summ;

    };



See how palindrome works.


Saturday, June 25, 2016

Required sign in the Labels

 <div class="col-md-2">
                            <label>Doctor Name<span class="required" style="color:red">*</span></label>
  </div>

Meta Tag in HTML

Example:
<head>
<meta charset="UTF-8">
<meta name="description" content="Web Technology">
<meta name="keywords" content="HTML,CSS,XML,JavaScript,ASP.NET,MVC">
<meta name="author" content="SS Technology">
</head>


Meta is data(information) about data. The <meta> tag provides metadata about the HTML document. Meta data will not be displayed on the web page. 
Meta elements are typically used to specify page description, keyword, author of the document, last modified and other meta data.  


Array Input output by C Programming

Tuesday, June 14, 2016

Converting Date Format and Time

 var for_formatting = (from n in db.BillMasterDbSet where n.COMPID == compid && n.PATIENTYY == year && n.PATIENTYYID == yearID select n).ToList(); //fetch data

                    string billdt= "", discharge = "", disTime = "";
                    foreach(var x in for_formatting)
                    {
                        billdt = Convert.ToDateTime(x.BILLDT).ToString("dd-MMM-yyyy");
// Example: Jun-14-2016
                        discharge = Convert.ToDateTime(x.DISCHGDT).ToString("dd-MMM-yyyy");
                        disTime = Convert.ToDateTime(x.DISCHGTM).ToString("HH:mm:ss");

                    }

Saturday, June 11, 2016

Autocomplete in Asp.NET MVC using Webapi 2

In the following part I am showing javascript Code:

 $('#PATIENTYYID').autocomplete({
                source: function (request, response) {
                    var compid = $('#txtcompid').val();
                    var year = $('#PATIENTYY').val();
                    $.ajax({
                        url: '/api/ApiControllername/PatientYID',
                        type: 'GET',
                        cache: false,
                        data: { query: request.term, query2: compid, Year: year },
                        dataType: 'json',
                        success: function (data) {
                            response($.map(data, function (item) {
                                return {
                                    label: item,
                                    value: item,


                                };
                            }));
                        }
                    });
                },
                select: function (event, ui) {
                    $('#PATIENTYYID').val(ui.item.label);


                    txtOneChanged();

                },
                change: $('#PATIENTYYID').keyup(_.debounce(txtOneChanged, 500))
            });


    function txtOneChanged() {


            var changedText = $("#PATIENTYYID").val();
            var changedText2 = $('#txtcompid').val();
            var year = $('#PATIENTYY').val();

            //var Name = document.getElementById('PatientYearID');
            var txtBox = document.getElementById('PATIENTYYID');

            var txtBox2 = document.getElementById('PatientName');

            var txtBox3 = document.getElementById('BILLDT');
            var txtBox4 = document.getElementById('BILLNO');
            var txtBox5 = document.getElementById('BILLYY');
            var txtBox6 = document.getElementById('DISCHGDT');
            var txtBox7 = document.getElementById('DISCHGTM');
            var txtBox8 = document.getElementById('RemarksMaster');

            if (changedText != "") {
                $.getJSON(
                 '/api/PatientName', { "ChangedText": changedText, "ChangedText2": changedText2 },//apiCabinBed
                 function (result) {

                     txtBox2.value = result;






                 });

                $.getJSON(
                    '/api/ApiControllername/DynamicPatinetYearId', {
                        "ChangedText": changedText, "ChangedText2": changedText2, "Year": year
                    },
                    function (result) {

                        txtBox.value = result[0].PATIENTYYID;
                        txtBox3.value = result[0].BILLDT;
                        txtBox4.value = result[0].BILLNO;
                        txtBox5.value = result[0].BILLYY;
                        txtBox6.value = result[0].DISCHGDT;
                        txtBox7.value = result[0].DISCHGTM;
                        txtBox8.value = result[0].RemarksMaster;





                    });

            }



        }


Lower Part Script:
<link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />

<script src="~/Scripts/jquery-ui-1.10.4.min.js"></script>

Now I am showing What I have done in the Apicontroller: 

  [System.Web.Http.Route("api/apiControllername/PatientYID")]
        [System.Web.Http.HttpGet]
        public IEnumerable<string> GetPatinetYearID(string query, string query2, Int64 Year)
        {
            using (var db = new DbContext())
            {
                Int64 compid = Convert.ToInt64(query2);
                List<string> result = new List<string>();
                var tags = from p in db.HDBContext
                           where p.COMPID == compid
                           select new { p.PATIENTYYID };
                string date = Convert.ToString(Year);

                string currentyear = date.Substring(2, 2);
                foreach (var tag in tags)
                {
                    if ((tag.PATIENTYYID.ToString().StartsWith(query) == true) && (tag.PATIENTYYID.ToString().StartsWith(currentyear) == true))
                    {
                        result.Add(tag.PATIENTYYID.ToString());
                    }

                }
                IEnumerable<string> en = result;


                return en;



            }
        }


        [System.Web.Http.Route("api/apiControllername/DynamicPatinetYearId")]
        [System.Web.Http.HttpGet]
        public IEnumerable<BDTO> DynamicPatientYid(string changedText, string changedText2, Int64 year)
        {
            using (var db = new DbContext())
            {
                Int64 compid = Convert.ToInt64(changedText2);
           
                String name = "";



                List<string> rt = new List<string>();

                var tags = from p in db.HDBContext
                           where p.COMPID == compid
                           select new { p.PATIENTYYID };
                string date = Convert.ToString(year);

                string currentyear = date.Substring(2, 2);
                //string currentyear = Convert.ToString(td).Substring(8, 2);
                foreach (var tag in tags)
                {
                    if ((tag.PATIENTYYID.ToString().StartsWith(changedText) == true) && (tag.PATIENTYYID.ToString().StartsWith(currentyear) == true))
                    {
                        rt.Add(tag.PATIENTYYID.ToString());
                    }

                }




                int lenChangedtxt = changedText.Length;

                Int64 cont = rt.Count();
                Int64 k = 0;
                string status = "";
                if (changedText != "" && cont != 0)
                {
                    while (status != "no")
                    {
                        k = 0;
                        foreach (var n in rt)
                        {
                            string ss = Convert.ToString(n);
                            string subss = "";
                            if (ss.Length >= lenChangedtxt)
                            {
                                subss = ss.Substring(0, lenChangedtxt);
                                subss = subss.ToUpper();
                            }
                            else
                            {
                                subss = "";
                            }


                            if (subss == changedText.ToUpper())
                            {
                                k++;
                            }
                            if (k == cont)
                            {
                                status = "yes";
                                lenChangedtxt++;
                                if (ss.Length > lenChangedtxt - 1)
                                {
                                    changedText = changedText + ss[lenChangedtxt - 1];
                                }
                                k = 0;
                            }
                            else
                            {
                                status = "no";
                                //lenChangedtxt--;

                            }

                        }

                    }
                    if (lenChangedtxt == 1)
                    {
                        name = changedText.Substring(0, lenChangedtxt);
                    }

                    else if (lenChangedtxt > 1)
                    {
                        name = changedText.Substring(0, lenChangedtxt - 1);
                    }




                }
                else
                {
                    name = changedText;
                }

                   Int64 yearID = Convert.ToInt64(name);

                   var find_data = (from n in db.BillMasterDbSet where n.COMPID == compid && n.PATIENTYY == year && n.PATIENTYYID==yearID select n).ToList();
                if(find_data.Count!=0)
                {
                    return (from t1 in db.BillMasterDbSet

                            where t1.COMPID == compid && t1.PATIENTYY == year && t1.PATIENTYYID == yearID
                            select new
                            {
                                billdate = t1.BILLDT,
                                billno = t1.BILLNO,
                                billyear = t1.BILLYY,
                                dischargedate = t1.DISCHGDT,
                                dischargetime = t1.DISCHGTM,
                                remarks=t1.REMARKS


                            })
                   .AsEnumerable().Select(a => new BillMasterDTO
                   {
                       PATIENTYYID=yearID,
                      BILLDT=Convert.ToString(a.billdate),
                      BILLYY=a.billyear,
                      BILLNO=a.billno,
                      DISCHGDT=a.dischargedate,
                      DISCHGTM=a.dischargetime,
                      RemarksMaster=a.remarks


                   }).ToList();
                }
                else
                {
                    return db.HMS_IpdDbSet.AsEnumerable().Select(a => new BillMasterDTO
                    {
                        PATIENTYYID = yearID,
                        PatientName = "",
                        BILLDT = "",
                        BILLYY = 0,
                        BILLNO = 0,
                     
                        RemarksMaster = ""


                    }).ToList();
                }

            }

        }

My autocomplete is slightly changed from general autocomplete. I am using an algorithm for matching 1st common part and showing that.
Example: Data set like: 1600001, 1600002, 1600003
By my autocomplete if you press 1 then it shows all related data and fetch 160000 to that textbox. Because 160000 is common in those data set.


Thank you
Enjoy Coding
SS Team

Thursday, June 9, 2016

4 mistakes to avoid in Ramadan

4 mistakes to avoid in Ramadan

1. getting angry
2. sleeping all day
3. fasting without prayer
4. and using bad languages


O ye who believe! Fasting is prescribed to you as it was prescribed to those before you, that ye may (learn) self-restraint. [2:183]

Monday, June 6, 2016

Update by SQL

UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;

Tuesday, May 31, 2016

SQL Database Connection in RAZOR View Engine/HTML

 


System.Data.SqlClient.SqlConnection conn1 = new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["DBContext"].ToString());
                    string query1 = string.Format(
                        @"SELECT DISTINCT HEADNM
FROM TABLE_ONE A INNER JOIN TABLE_TWO B ON A.COMPID = B.COMPID AND A.CHARGEID = B.HEADID AND B.HEADTP = 'ABC'");
                    System.Data.SqlClient.SqlCommand cmd1 = new System.Data.SqlClient.SqlCommand(query1, conn1);
                    conn1.Open();
                    SqlDataAdapter da1 = new SqlDataAdapter(cmd1);
                    DataTable ds1 = new DataTable();
                    da1.Fill(ds1);


  foreach (DataRow parentRow in ds1.Rows)
{
.......
.......
.......
.......

}

Helpful page or site

This is a very helpful page. Traverse this page, I think you will surely like this page.

 SS TECHNOLOGY

Thanks for visiting my blog.

INNER JOIN IN SQL

Select Distinct HeadName by INNER JOIN query:

SELECT DISTINCT HEADNM
FROM HMS_PCHGOTC A INNER JOIN HMS_HEADIO B ON A.COMPID = B.COMPID AND A.CHARGEID = B.HEADID AND B.HEADTP = 'IPD'

Monday, May 30, 2016

ALLAH is Almighty

If ALLAH can turn night into day, then surely ALLAH can turn the darkness of your life into happiness and prosperity. Trust in ALLAH. 

Comma in amount by ASP.NET MVC

In the view page I have used this :

                         if (item.CREDITAMT < 0)//Determine negative number
                        {
                            item.CREDITAMT = item.CREDITAMT * (-1);// make that positive
                            ccheck = 1;// Flag for negative check
                            string convertcredit = Convert.ToString(item.CREDITAMT);

                            creditamt = CommainAmount.AmountwithComma(convertcredit);// This link up                                 //with DataAccess Folder
                        }
                        else
                        {
                            ccheck = 0;//flag for positive check
                            string convertcredit = Convert.ToString(item.CREDITAMT);

                            creditamt = CommainAmount.AmountwithComma(convertcredit);// This link up                                 //with DataAccess Folder
                        }


In the DataAccess Folder there are ComminAmount Class and AmountwithComma method:

   public static string AmountwithComma(string CVal)
        {

            string value = "", gotpoint = "", commainvalue = "", firstpart = "", secondpart = "", thirdpart = "", fourthpart = "", finalvalue = "";
            int lengthdebit = CVal.Length;
         

         
         
            for (int i = 0; i < lengthdebit; i++)
            {
                if (CVal[i] == '.')
                {
                    value = CVal.Substring(0, i);
                    commainvalue = CVal.Substring(i, (lengthdebit - i));
                    gotpoint = "y";
                    break;
                }
            }
            if (gotpoint == "y")
            {
                int valuelength = value.Length;
                if (valuelength > 3 && valuelength > 5 && valuelength > 7)
                {
                    value = new string(value.ToCharArray().Reverse().ToArray());
                    firstpart = value.Substring(0, 3);
                    secondpart = value.Substring(3, 2);
                    thirdpart = value.Substring(5, 2);
                    fourthpart = value.Substring(7, valuelength - 7);
                    finalvalue = firstpart + "," + secondpart + "," + thirdpart + "," + fourthpart;
                    finalvalue = new string(finalvalue.ToCharArray().Reverse().ToArray());
                    finalvalue = finalvalue + commainvalue;
                }
                else if (valuelength > 3 && valuelength > 5)
                {
                    value = new string(value.ToCharArray().Reverse().ToArray());
                    firstpart = value.Substring(0, 3);
                    secondpart = value.Substring(3, 2);

                    thirdpart = value.Substring(5, valuelength - 5);
                    finalvalue = firstpart + "," + secondpart + "," + thirdpart;
                    finalvalue = new string(finalvalue.ToCharArray().Reverse().ToArray());
                    finalvalue = finalvalue + commainvalue;
                }
                else if (valuelength > 3)
                {
                    value = new string(value.ToCharArray().Reverse().ToArray());
                    firstpart = value.Substring(0, 3);


                    secondpart = value.Substring(3, valuelength - 3);
                    finalvalue = firstpart + "," + secondpart;
                    finalvalue = new string(finalvalue.ToCharArray().Reverse().ToArray());
                    finalvalue = finalvalue + commainvalue;
                }
                else
                {
                    finalvalue = value;
                    finalvalue = finalvalue + commainvalue;
                }
            }
            else
            {
                finalvalue = CVal;
            }


            return finalvalue;

        }
    }


That's it. Enjoy your code. Thank you.


Wednesday, May 25, 2016

DropdownList load by change effect with ASP.NET MVC and Javascript

I am loading branch by selecting company. Here is my branch label and dropdownlist for branch.
  <div class="row">
                <div class="col-md-3">
                    @Html.Label("name", "Branch Name")
                </div>
                <div class="col-md-8">
                    @Html.DropDownListFor(model => model.BRANCHID, new SelectList(string.Empty, "Value", "Text"), "--Select--", new { id = "txtBranchID", @class = "form-control", @required = "required" })
                </div>
            </div>


Javascript code:
 $('#txtcompid').change(function () {
                var changedtxt = $('#txtcompid').val();
                $.getJSON(
                  "/AslUserCO/BranchLoad", { "Changedtxt": changedtxt},
                  function (myData) {


                      $("#txtBranchID").empty();
                 


                      $.each(myData.branch, function (i, memo) {

                          $("#txtBranchID").append('<option value="'
                              + memo.Value + '">'
                              + memo.Text + '</option>');

                      });


                  });

            });


Here is my method in AslUserCO controller:

        [AcceptVerbs(HttpVerbs.Get)]
        public JsonResult BranchLoad(Int64 changedtxt)
        {
            var selectdata = from n in db.Asl_BranchDbSet where n.COMPID == changedtxt select new {              n.BRANCHID, n.BRANCHNM};
         

           List<SelectListItem> branchlist = new List<SelectListItem>();

            foreach (var x in selectdata)
                {
                    branchlist.Add(new SelectListItem { Text = x.BRANCHNM, Value =                      Convert.ToString(x.BRANCHID) });
                }




            var result = new { branch = branchlist };

            return Json(result, JsonRequestBehavior.AllowGet);

        }


Wednesday, April 20, 2016

Question Answer

1. C# class can inherit multiple ________
Ans: Interface
2. Which of the followings are value types in C#?
Ans: 
  1. Int32
  2. Double
  3. Decimal
3. Which of the following is a reference type in C#?
Ans: String
4. What is Nullable type?
Ans: It allows assignment of null to value type.
5. Struct is a _____.
Ans: Value type
6. 10 > 9 ? “10 is greater than 9” : “9 is greater than 10” is an example of _______
Ans: Ternary operator
7. Which of the following datatype can be used with enum?
Ans: Int
8. What is indexer?
Ans: It allows an instance of a class to be indexed like an array
9. String data type is ______.
Ans: Immutable
10. An array in C# starts with _____ index.
Ans: Zero
11. Which of the following is right way of declaring an array?
Ans: Int[] intArray = new int[5];
12. Which of the following is true for ReadOnly variables?
Ans: Value will be assigned at runtime.
13. Which of the following statement is true?
Ans: 
  1. try block must be followed by catch and finally block.
  2. try block must be followed by catch or finally block or both.
  3. try block can include another try block.
14. Which of the following statement is true?
Ans: A finally block cannot include return or break keyword.
15. Func and Action are the types of ______.
Ans: Delegate
16. Return type of Predicate <T>() is always a ______.
Ans: Boolean
17. A partial class allows ________
Ans: Implementation of single class in multiple .cs files.
18. LINQ stands for ________.
Ans: Language Integrated Query
19. Data type of a variable declared using var will be assigned at _______.
Ans: Compile time
20. Which of the following is true for dynamic type in C#?
Ans: It escapes compile time type checking

Monday, April 11, 2016

CASE IN in SQL

SELECT CASE WHEN ASL_COLLECT.TRANSFOR ='BILL' THEN 'BILL' WHEN ASL_COLLECT.TRANSFOR ='ADV'
THEN 'ADVANCE' WHEN ASL_COLLECT.TRANSFOR IN ('MFEE','MAINTENANCE FEE') THEN 'MAINTENANCE FEE' END AS TRANSFOR FROM ASL_COLLECT

Thursday, April 7, 2016

Select Tomorrow or Yesterday in C#


DateTime tomorrow = DateTime.Now.AddDays(1);
DateTime yesterday = DateTime.Now.AddDays(-1);

Wednesday, April 6, 2016

Displaying dropdown list in ASP.NET MVC

In a view page: like index.cshtml

@using ProjectName.Models
@model ProjectName.Models.DTO.CBDTO
@{
List<SelectListItem>listcabintype=new List<SelectListItem>();
    listcabintype.Add(new SelectListItem{Text="PATIENT",Value = "PATIENT"});
    listcabintype.Add(new SelectListItem { Text = "RELATIVE", Value = "RELATIVE" });

}

....your needed links here...

@using (Html.BeginForm())
{
      ............................Your code................

 @Html.DropDownListFor(model => model.CabinType, listcabintype,new {  @class = "form-control input-sm", id = "CabinType" })


..........................................Code..................
}

Monday, April 4, 2016

Left Outer join by LINQ

 var opd_data = (from t1 in db.HMS_OPD
                         join t2 in db.HMS_OPDMST on t1.PATIENTYYID equals t2.PATIENTYYID
                         join t3 in db.HMS_HEADIO on t1.BILLID equals t3.HEADID
                         join t4 in db.HMS_TEST on t1.TESTID equals t4.TESTID
                        into ps from t4 in ps.DefaultIfEmpty()
 where t1.COMPID == compid && t1.TRANSDT == fdate && t1.PATIENTYYID == patientyid &&
                                        (t1.TESTID == t4.TESTID || t1.TESTID == null)
                                        select new
                                        {
                                            Id = t1.ID,

                                            compid = t1.COMPID,
                                            Transdate = t1.TRANSDT,
                                            Patientid = t1.PATIENTID,
                                            Patientyid=t1.PATIENTYYID,
                                            referid = t1.REFERID,
                                            billid=t1.BILLID,
                                            billname = t3.HEADNM,
                                            testsl = t1.TESTSL,
                                            tcatid = t1.TCATID,
                                         
                                            testid = t1.TESTID,
                                            testname = t4.TESTNM,
                                            amount = t1.AMOUNT,
                                            pcntr = t1.PCNTR,
                                            pcntd = t1.PCNTD,
                                            discr = t1.DISCR,
                                            remarks = t1.REMARKS


                                        });

                        foreach (var item in opd_data)
                        {
                            string testnm = "";
                            if (item.testid == null)
                            {
                                testnm = "";
                            }
                            else
                            {
                                testnm = item.testname;
                            }
                            yield return new OpdDTO
                            {
                                ID = item.Id,
                                COMPID = item.compid,
                                PatientName = PatientName,
                                TransactionDate = Convert.ToString( item.Transdate),
                             
                                PatientID = item.Patientid,
                                PatientYearID = Convert.ToInt64(item.Patientyid),
                                ReferID = item.referid,
                                TestSerial = item.testsl,
                                BillId = item.billid,
                                Billname = item.billname,
                                TestCategoryId = item.tcatid,
                                //TestCategoryName = item.tCatname,
                                TestID = item.testid,
                                TestName =testnm,
                                Amount = item.amount,
                                Pcntd = item.pcntd,
                                Pcntr = item.pcntr,
                                Discr = item.discr,
                                Remarks = item.remarks

                            };
                        }

Saturday, April 2, 2016

Updating data in ASP.NET MVC

  var ache_kina_data = (from n in db.dbSetName where n.COMPID == compid && n.TRANSNO == TransNo select n).ToList();

 foreach (var otMaster in ache_kina_data)
                {

                    otMaster.ID = otMaster.ID;
                    otMaster.COMPID = otMaster.COMPID;
                    otMaster.TRANSDT = otMaster.TRANSDT;
                    otMaster.TRANSYY = otMaster.TRANSYY;
                    otMaster.TRANSNO = otMaster.TRANSNO;

                 
                    otMaster.OPTMFR = timefrom;
                    otMaster.OPTMTO = timeto;
                    otMaster.REMARKS = remarks;
                 

                   

                }
                db.SaveChanges();


Interview Question/Answer Version 1

1. What is the full form of OOPS?
Ans: Object Oriented Programming System.
2. What is a class?
Ans: Class is a blue print which reflects the entities attributes and actions. Technically defining a class is designing an user defined data type.
3. What is an Object?
Ans: An instance of the class is called as object.
4. List the types of inheritance supported in C++
Ans:Single, Multilevel, Multiple, Hierarchical and Hybrid.
5. What is the role of protected access specifier?
Ans: If a class member is protected then it is accessible in the inherited class. However, outside the both the private and protected members are not accessible.
6. What is encapsulation?
Ans: The process of binding the data and the functions acting on the data together in an entity (class) called as encapsulation.
7. What is abstraction?
Ans: Abstraction refers to hiding the internal implementation and exhibiting only the necessary details.
8. What is inheritance?
Ans: Inheritance is the process of acquiring the properties of the existing class into the new class. The existing class is called as base/parent class and the inherited class is called as derived/child class.
9. Explain the purpose of the keyword volatile.
Ans: Declaring a variable volatile directs the compiler that the variable can be changed externally. Hence avoiding compiler optimization on the variable reference.
10. What is an inline function?
Ans: A function prefixed with the keyword inline before the function definition is called as inline function. The inline functions are faster in execution when compared to normal functions as the compiler treats inline functions as macros.
11. What is a storage class?
Ans: Storage class specifies the life or scope of symbols such as variable or functions.
12. Mention the storage classes names in C++.
Ans: The following are storage classes supported in C++
auto, static, extern, register and mutable.
13. What is the role of mutable storage class specifier?
Ans: A constant class object’s member variable can be altered by declaring it using mutable storage class specifier. Applicable only for non-static and non-constant member variable of the class.
14. Distinguish between shallow copy and deep copy.
Ans: Shallow copy does memory dumping bit-by-bit from one object to another. Deep copy is copy field by field from object to another. Deep copy is achieved using copy constructor and or overloading assignment operator.
15. What is a pure virtual function?
Ans: A virtual function with no function body and assigned with a value zero is called as pure virtual function.
16. What is an abstract class in C++?
Ans: A class with at least one pure virtual function is called as abstract class. We cannot instantiate an abstract class.
17. What is a reference variable in C++?
Ans: A reference variable is an alias name for the existing variable. Which mean both the variable name and reference variable point to the same memory location. Therefore update on the original variable can be achieved using reference variable too.
18. What is role of static keyword on class member variable?
Ans: A static variable does exit though the objects for the respective class are not created. Static member variable share a common memory across all the objects created for the respective class. A static member variable can be referred using the class name itself.
19. Explain the static member function.
Ans: A static member function can be invoked using the class name as it exits before class objects comes into existence. It can access only static members of the class.
20. Name the data type which can be used to store wide characters in C++.
Ans: wchar_t